<!DOCTYPE html>
<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>APIDocument</title>


<style type="text/css">
body {
  font-family: Helvetica, arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  padding-top: 10px;
  padding-bottom: 10px;
  background-color: white;
  padding: 30px; }

body > *:first-child {
  margin-top: 0 !important; }
body > *:last-child {
  margin-bottom: 0 !important; }

a {
  color: #4183C4; }
a.absent {
  color: #cc0000; }
a.anchor {
  display: block;
  padding-left: 30px;
  margin-left: -30px;
  cursor: pointer;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0; }

h1, h2, h3, h4, h5, h6 {
  margin: 20px 0 10px;
  padding: 0;
  font-weight: bold;
  -webkit-font-smoothing: antialiased;
  cursor: text;
  position: relative; }

h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {
  background: url() no-repeat 10px center;
  text-decoration: none; }

h1 tt, h1 code {
  font-size: inherit; }

h2 tt, h2 code {
  font-size: inherit; }

h3 tt, h3 code {
  font-size: inherit; }

h4 tt, h4 code {
  font-size: inherit; }

h5 tt, h5 code {
  font-size: inherit; }

h6 tt, h6 code {
  font-size: inherit; }

h1 {
  font-size: 28px;
  color: black; }

h2 {
  font-size: 24px;
  border-bottom: 1px solid #cccccc;
  color: black; }

h3 {
  font-size: 18px; }

h4 {
  font-size: 16px; }

h5 {
  font-size: 14px; }

h6 {
  color: #777777;
  font-size: 14px; }

p, blockquote, ul, ol, dl, li, table, pre {
  margin: 15px 0; }

hr {
  background: transparent url() repeat-x 0 0;
  border: 0 none;
  color: #cccccc;
  height: 4px;
  padding: 0;
}

body > h2:first-child {
  margin-top: 0;
  padding-top: 0; }
body > h1:first-child {
  margin-top: 0;
  padding-top: 0; }
  body > h1:first-child + h2 {
    margin-top: 0;
    padding-top: 0; }
body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child {
  margin-top: 0;
  padding-top: 0; }

a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
  margin-top: 0;
  padding-top: 0; }

h1 p, h2 p, h3 p, h4 p, h5 p, h6 p {
  margin-top: 0; }

li p.first {
  display: inline-block; }
li {
  margin: 0; }
ul, ol {
  padding-left: 30px; }

ul :first-child, ol :first-child {
  margin-top: 0; }

dl {
  padding: 0; }
  dl dt {
    font-size: 14px;
    font-weight: bold;
    font-style: italic;
    padding: 0;
    margin: 15px 0 5px; }
    dl dt:first-child {
      padding: 0; }
    dl dt > :first-child {
      margin-top: 0; }
    dl dt > :last-child {
      margin-bottom: 0; }
  dl dd {
    margin: 0 0 15px;
    padding: 0 15px; }
    dl dd > :first-child {
      margin-top: 0; }
    dl dd > :last-child {
      margin-bottom: 0; }

blockquote {
  border-left: 4px solid #dddddd;
  padding: 0 15px;
  color: #777777; }
  blockquote > :first-child {
    margin-top: 0; }
  blockquote > :last-child {
    margin-bottom: 0; }

table {
  padding: 0;border-collapse: collapse; }
  table tr {
    border-top: 1px solid #cccccc;
    background-color: white;
    margin: 0;
    padding: 0; }
    table tr:nth-child(2n) {
      background-color: #f8f8f8; }
    table tr th {
      font-weight: bold;
      border: 1px solid #cccccc;
      margin: 0;
      padding: 6px 13px; }
    table tr td {
      border: 1px solid #cccccc;
      margin: 0;
      padding: 6px 13px; }
    table tr th :first-child, table tr td :first-child {
      margin-top: 0; }
    table tr th :last-child, table tr td :last-child {
      margin-bottom: 0; }

img {
  max-width: 100%; }

span.frame {
  display: block;
  overflow: hidden; }
  span.frame > span {
    border: 1px solid #dddddd;
    display: block;
    float: left;
    overflow: hidden;
    margin: 13px 0 0;
    padding: 7px;
    width: auto; }
  span.frame span img {
    display: block;
    float: left; }
  span.frame span span {
    clear: both;
    color: #333333;
    display: block;
    padding: 5px 0 0; }
span.align-center {
  display: block;
  overflow: hidden;
  clear: both; }
  span.align-center > span {
    display: block;
    overflow: hidden;
    margin: 13px auto 0;
    text-align: center; }
  span.align-center span img {
    margin: 0 auto;
    text-align: center; }
span.align-right {
  display: block;
  overflow: hidden;
  clear: both; }
  span.align-right > span {
    display: block;
    overflow: hidden;
    margin: 13px 0 0;
    text-align: right; }
  span.align-right span img {
    margin: 0;
    text-align: right; }
span.float-left {
  display: block;
  margin-right: 13px;
  overflow: hidden;
  float: left; }
  span.float-left span {
    margin: 13px 0 0; }
span.float-right {
  display: block;
  margin-left: 13px;
  overflow: hidden;
  float: right; }
  span.float-right > span {
    display: block;
    overflow: hidden;
    margin: 13px auto 0;
    text-align: right; }

code, tt {
  margin: 0 2px;
  padding: 0 5px;
  white-space: nowrap;
  border: 1px solid #eaeaea;
  background-color: #f8f8f8;
  border-radius: 3px; }

pre code {
  margin: 0;
  padding: 0;
  white-space: pre;
  border: none;
  background: transparent; }

.highlight pre {
  background-color: #f8f8f8;
  border: 1px solid #cccccc;
  font-size: 13px;
  line-height: 19px;
  overflow: auto;
  padding: 6px 10px;
  border-radius: 3px; }

pre {
  background-color: #f8f8f8;
  border: 1px solid #cccccc;
  font-size: 13px;
  line-height: 19px;
  overflow: auto;
  padding: 6px 10px;
  border-radius: 3px; }
  pre code, pre tt {
    background-color: transparent;
    border: none; }

sup {
    font-size: 0.83em;
    vertical-align: super;
    line-height: 0;
}

kbd {
  display: inline-block;
  padding: 3px 5px;
  font-size: 11px;
  line-height: 10px;
  color: #555;
  vertical-align: middle;
  background-color: #fcfcfc;
  border: solid 1px #ccc;
  border-bottom-color: #bbb;
  border-radius: 3px;
  box-shadow: inset 0 -1px 0 #bbb
}

* {
	-webkit-print-color-adjust: exact;
}
@media screen and (min-width: 914px) {
    body {
        width: 854px;
        margin:0 auto;
    }
}
@media print {
	table, pre {
		page-break-inside: avoid;
	}
	pre {
		word-wrap: break-word;
	}
}
</style>

<style type="text/css">
/**
 * prism.js default theme for JavaScript, CSS and HTML
 * Based on dabblet (http://dabblet.com)
 * @author Lea Verou
 */

code[class*="language-"],
pre[class*="language-"] {
	color: black;
	background: none;
	text-shadow: 0 1px white;
	font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
	word-break: normal;
	word-wrap: normal;
	line-height: 1.5;

	-moz-tab-size: 4;
	-o-tab-size: 4;
	tab-size: 4;

	-webkit-hyphens: none;
	-moz-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;
}

pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
	text-shadow: none;
	background: #b3d4fc;
}

pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
	text-shadow: none;
	background: #b3d4fc;
}

@media print {
	code[class*="language-"],
	pre[class*="language-"] {
		text-shadow: none;
	}
}

/* Code blocks */
pre[class*="language-"] {
	padding: 1em;
	margin: .5em 0;
	overflow: auto;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
	background: #f5f2f0;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
	padding: .1em;
	border-radius: .3em;
	white-space: normal;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
	color: slategray;
}

.token.punctuation {
	color: #999;
}

.namespace {
	opacity: .7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
	color: #905;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
	color: #690;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
	color: #a67f59;
	background: hsla(0, 0%, 100%, .5);
}

.token.atrule,
.token.attr-value,
.token.keyword {
	color: #07a;
}

.token.function {
	color: #DD4A68;
}

.token.regex,
.token.important,
.token.variable {
	color: #e90;
}

.token.important,
.token.bold {
	font-weight: bold;
}
.token.italic {
	font-style: italic;
}

.token.entity {
	cursor: help;
}
</style>


</head>

<body>

<h1 id="toc_0">API design</h1>

<ul class="toc">
<li>
<a href="#toc_0">API design</a>
</li>
<li>
<a href="#toc_1">API STD</a>
</li>
<li>
<a href="#toc_2">URL head</a>
</li>
<li>
<a href="#toc_3">版本详情</a>
</li>
<li>
<a href="#toc_4">服务器返回状态码</a>
</li>
<li>
<a href="#toc_5">Tree View</a>
</li>
<li>
<a href="#toc_6">API Lists</a>
<ul>
<li>
<a href="#toc_7"><code>/table/lesson</code>(todo)</a>
</li>
<li>
<a href="#toc_8"><code>/table/lesson/format</code></a>
<ul>
<li>
<a href="#toc_9"><code>GET</code> 查询课程组 (如「英语听说课」)</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_10">HEAD</a>
</li>
<li>
<a href="#toc_11">Params</a>
</li>
<li>
<a href="#toc_12">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_13"><code>PUT</code> 更改课程组</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_14">HEAD</a>
</li>
<li>
<a href="#toc_15">Body</a>
</li>
<li>
<a href="#toc_16">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_17"><code>POST</code> 添加新课程组</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_18">HEAD</a>
</li>
<li>
<a href="#toc_19">Body</a>
</li>
<li>
<a href="#toc_20">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_21"><code>DELETE</code> 删除课程组</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_22">HEAD</a>
</li>
<li>
<a href="#toc_23">Body</a>
</li>
<li>
<a href="#toc_24">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_25"><code>/table/class_field/</code> (todo)</a>
</li>
<li>
<a href="#toc_26"><code>/table/class_field/wrapper</code></a>
<ul>
<li>
<a href="#toc_27"><code>GET</code> 根据筛选选项获取教学班拥有学生数及学生的id</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_28">Head</a>
</li>
<li>
<a href="#toc_29">Params</a>
</li>
<li>
<a href="#toc_30">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_31"><code>/table/class_field/format</code></a>
<ul>
<li>
<a href="#toc_32"><code>GET</code> 根据筛选项获取教学班组织信息(即教学班与学生的多对多关系)</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_33">Head</a>
</li>
<li>
<a href="#toc_34">Params</a>
</li>
<li>
<a href="#toc_35">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_36"><code>POST</code> 添加新的返回教学班组织信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_37">HEAD</a>
</li>
<li>
<a href="#toc_38">Body</a>
</li>
<li>
<a href="#toc_39">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_40"><code>DELETE</code> 删除教学班组织信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_41">HEAD</a>
</li>
<li>
<a href="#toc_42">Body</a>
</li>
<li>
<a href="#toc_43">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_44"><code>/table/class_info</code>(todo)</a>
</li>
<li>
<a href="#toc_45"><code>/table/class_info/detail/all</code></a>
<ul>
<li>
<a href="#toc_46"><code>GET</code> 管理员获取到所有课程信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_47">Head</a>
</li>
<li>
<a href="#toc_48">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_49"><code>/table/class_info/detail/some</code></a>
<ul>
<li>
<a href="#toc_50"><code>GET</code> 任课教师获取到个人课程信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_51">Head</a>
</li>
<li>
<a href="#toc_52">Params</a>
</li>
<li>
<a href="#toc_53">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_54"><code>/table/class_info/format</code></a>
<ul>
<li>
<a href="#toc_55"><code>GET</code> 获取课程的全部辅助信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_56">Head</a>
</li>
<li>
<a href="#toc_57">Params</a>
</li>
<li>
<a href="#toc_58">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_59"><code>POST</code> 添加新的返回教学班辅助信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_60">HEAD</a>
</li>
<li>
<a href="#toc_61">Body</a>
</li>
<li>
<a href="#toc_62">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_63"><code>PUT</code> 更改课程辅助信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_64">HEAD</a>
</li>
<li>
<a href="#toc_65">Params</a>
</li>
<li>
<a href="#toc_66">Body</a>
</li>
<li>
<a href="#toc_67">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_68"><code>DELETE</code> 删除已有的课程信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_69">HEAD</a>
</li>
<li>
<a href="#toc_70">Body</a>
</li>
<li>
<a href="#toc_71">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_72"><code>/user</code>(todo)</a>
</li>
<li>
<a href="#toc_73"><code>/user/info</code>(todo)</a>
</li>
<li>
<a href="#toc_74"><code>/user/info/display</code></a>
<ul>
<li>
<a href="#toc_75"><code>GET</code> 获取用户所有信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_76">HEAD</a>
</li>
<li>
<a href="#toc_77">Params</a>
</li>
<li>
<a href="#toc_78">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_79"><code>/user/info/format</code></a>
<ul>
<li>
<a href="#toc_80"><code>GET</code> 获取用户的信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_81">HEAD</a>
</li>
<li>
<a href="#toc_82">Params</a>
</li>
<li>
<a href="#toc_83">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_84"><code>PUT</code> 更改当前登录用户信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_85">HEAD</a>
</li>
<li>
<a href="#toc_86">Body</a>
</li>
<li>
<a href="#toc_87">Resonpse</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_88"><code>/user/info/manage</code></a>
<ul>
<li>
<a href="#toc_89"><code>GET</code> 获取用户的信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_90">HEAD</a>
</li>
<li>
<a href="#toc_91">Params</a>
</li>
<li>
<a href="#toc_92">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_93"><code>POST</code> 创建新用户</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_94">HEAD</a>
</li>
<li>
<a href="#toc_95">Body</a>
</li>
<li>
<a href="#toc_96">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_97"><code>PUT</code> 更改用户信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_98">HEAD</a>
</li>
<li>
<a href="#toc_99">Body</a>
</li>
<li>
<a href="#toc_100">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_101"><code>DELETE</code> 删除指定的用户</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_102">HEAD</a>
</li>
<li>
<a href="#toc_103">Params</a>
</li>
<li>
<a href="#toc_104">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_105"><code>/user/login</code></a>
<ul>
<li>
<a href="#toc_106"><code>POST</code> 用户登陆</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_107">Body</a>
</li>
<li>
<a href="#toc_108">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_109"><code>/user/logout</code></a>
<ul>
<li>
<a href="#toc_110"><code>POST</code> 登出用户</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_111">HEAD</a>
</li>
<li>
<a href="#toc_112">Body</a>
</li>
<li>
<a href="#toc_113">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_114"><code>/user/logon</code></a>
<ul>
<li>
<a href="#toc_115"><code>POST</code> 注册用户</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_116">Body</a>
</li>
<li>
<a href="#toc_117">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_118"><code>/student/</code>(todo)</a>
</li>
<li>
<a href="#toc_119"><code>/student/display</code></a>
<ul>
<li>
<a href="#toc_120"><code>GET</code> 获取学生的完整信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_121">HEAD</a>
</li>
<li>
<a href="#toc_122">Params</a>
</li>
<li>
<a href="#toc_123">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_124"><code>/student/format</code></a>
<ul>
<li>
<a href="#toc_125"><code>GET</code> 获取学生的基本信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_126">HEAD</a>
</li>
<li>
<a href="#toc_127">Params</a>
</li>
<li>
<a href="#toc_128">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_129"><code>PUT</code> 更改学生的基本信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_130">HEAD</a>
</li>
<li>
<a href="#toc_131">Params</a>
</li>
<li>
<a href="#toc_132">Body</a>
</li>
<li>
<a href="#toc_133">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_134"><code>POST</code> 创建新用户/学生</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_135">HEAD</a>
</li>
<li>
<a href="#toc_136">Body</a>
</li>
<li>
<a href="#toc_137">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_138"><code>DELETE</code> 删除指定的用户/学生</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_139">HEAD</a>
</li>
<li>
<a href="#toc_140">Params</a>
</li>
<li>
<a href="#toc_141">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_142"><code>/university</code>(todo)</a>
</li>
<li>
<a href="#toc_143"><code>/university/format</code></a>
<ul>
<li>
<a href="#toc_144"><code>GET</code> 获取大学相关信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_145">HEAD</a>
</li>
<li>
<a href="#toc_146">Params</a>
</li>
<li>
<a href="#toc_147">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_148"><code>PUT</code> 更新大学相关信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_149">HEAD</a>
</li>
<li>
<a href="#toc_150">Body</a>
</li>
<li>
<a href="#toc_151">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_152"><code>POST</code> 创建新的大学信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_153">HEAD</a>
</li>
<li>
<a href="#toc_154">Body</a>
</li>
<li>
<a href="#toc_155">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_156"><code>DELETE</code> 删除已有的大学信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_157">HEAD</a>
</li>
<li>
<a href="#toc_158">Body</a>
</li>
<li>
<a href="#toc_159">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_160"><code>/college</code>(todo)</a>
</li>
<li>
<a href="#toc_161"><code>/college/display</code></a>
<ul>
<li>
<a href="#toc_162"><code>GET</code> 获取院系全部相关信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_163">HEAD</a>
</li>
<li>
<a href="#toc_164">Params</a>
</li>
<li>
<a href="#toc_165">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_166"><code>/college/format</code></a>
<ul>
<li>
<a href="#toc_167"><code>GET</code> 获取院系相关信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_168">HEAD</a>
</li>
<li>
<a href="#toc_169">Params</a>
</li>
<li>
<a href="#toc_170">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_171"><code>PUT</code> 更新院系相关信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_172">HEAD</a>
</li>
<li>
<a href="#toc_173">Body</a>
</li>
<li>
<a href="#toc_174">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_175"><code>POST</code> 创建新的院系信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_176">HEAD</a>
</li>
<li>
<a href="#toc_177">Body</a>
</li>
<li>
<a href="#toc_178">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_179"><code>DELETE</code> 删除已有的院系信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_180">HEAD</a>
</li>
<li>
<a href="#toc_181">Body</a>
</li>
<li>
<a href="#toc_182">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_183"><code>/major</code>(todo)</a>
</li>
<li>
<a href="#toc_184"><code>/major/format</code></a>
<ul>
<li>
<a href="#toc_185"><code>GET</code> 获取专业相关信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_186">HEAD</a>
</li>
<li>
<a href="#toc_187">Params</a>
</li>
<li>
<a href="#toc_188">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_189"><code>PUT</code> 更新专业相关信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_190">HEAD</a>
</li>
<li>
<a href="#toc_191">Body</a>
</li>
<li>
<a href="#toc_192">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_193"><code>POST</code> 创建新的专业信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_194">HEAD</a>
</li>
<li>
<a href="#toc_195">Body</a>
</li>
<li>
<a href="#toc_196">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_197"><code>DELETE</code> 删除已有的专业信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_198">HEAD</a>
</li>
<li>
<a href="#toc_199">Body</a>
</li>
<li>
<a href="#toc_200">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_201"><code>/point</code></a>
</li>
<li>
<a href="#toc_202"><code>/point/display</code></a>
<ul>
<li>
<a href="#toc_203"><code>GET</code> 获取所有符合条件分数信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_204">HEAD</a>
</li>
<li>
<a href="#toc_205">Params</a>
</li>
<li>
<a href="#toc_206">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_207"><code>/point/format</code></a>
<ul>
<li>
<a href="#toc_208"><code>GET</code> 获取分数条目</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_209">HEAD</a>
</li>
<li>
<a href="#toc_210">Params</a>
</li>
<li>
<a href="#toc_211">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_212"><code>PUT</code> 更新分数条目</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_213">HEAD</a>
</li>
<li>
<a href="#toc_214">Params</a>
</li>
<li>
<a href="#toc_215">Body</a>
</li>
<li>
<a href="#toc_216">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_217"><code>POST</code> 创建新的分数条目</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_218">HEAD</a>
</li>
<li>
<a href="#toc_219">Body</a>
</li>
<li>
<a href="#toc_220">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_221"><code>DELETE</code> 删除已有的分数条目</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_222">HEAD</a>
</li>
<li>
<a href="#toc_223">Params</a>
</li>
<li>
<a href="#toc_224">Body</a>
</li>
<li>
<a href="#toc_225">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_226"><code>/point/import_data</code></a>
<ul>
<li>
<a href="#toc_227"><code>POST</code> 导入分数</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_228">HEAD</a>
</li>
<li>
<a href="#toc_229">Body</a>
</li>
<li>
<a href="#toc_230">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_231"><code>/title</code></a>
</li>
<li>
<a href="#toc_232"><code>/title/display</code></a>
<ul>
<li>
<a href="#toc_233"><code>GET</code> 获取小项相关所有信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_234">HEAD</a>
</li>
<li>
<a href="#toc_235">Params</a>
</li>
<li>
<a href="#toc_236">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_237"><code>/title/format</code></a>
<ul>
<li>
<a href="#toc_238"><code>GET</code> 获取小项相关信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_239">HEAD</a>
</li>
<li>
<a href="#toc_240">Params</a>
</li>
<li>
<a href="#toc_241">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_242"><code>PUT</code> 更新小项相关信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_243">HEAD</a>
</li>
<li>
<a href="#toc_244">Body</a>
</li>
<li>
<a href="#toc_245">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_246"><code>POST</code> 创建新的小项信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_247">HEAD</a>
</li>
<li>
<a href="#toc_248">Body</a>
</li>
<li>
<a href="#toc_249">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_250"><code>DELETE</code> 删除已有的小项信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_251">HEAD</a>
</li>
<li>
<a href="#toc_252">Body</a>
</li>
<li>
<a href="#toc_253">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_254"><code>/title_group</code>(todo)</a>
</li>
<li>
<a href="#toc_255"><code>/title_group/format</code></a>
<ul>
<li>
<a href="#toc_256"><code>GET</code> 获取大项相关信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_257">HEAD</a>
</li>
<li>
<a href="#toc_258">Params</a>
</li>
<li>
<a href="#toc_259">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_260"><code>PUT</code> 更新大项相关信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_261">HEAD</a>
</li>
<li>
<a href="#toc_262">Body</a>
</li>
<li>
<a href="#toc_263">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_264"><code>POST</code> 创建新的大项信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_265">HEAD</a>
</li>
<li>
<a href="#toc_266">Body</a>
</li>
<li>
<a href="#toc_267">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_268"><code>DELETE</code> 删除已有的大项信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_269">HEAD</a>
</li>
<li>
<a href="#toc_270">Body</a>
</li>
<li>
<a href="#toc_271">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_272"><code>/semester</code>(todo)</a>
<ul>
<li>
<a href="#toc_273"><code>GET</code> 获取当前学期信息</a>
</li>
<li>
<a href="#toc_274"><code>PUT</code> 更改学期信息</a>
</li>
</ul>
</li>
<li>
<a href="#toc_275"><code>/analysis</code>(todo)</a>
</li>
<li>
<a href="#toc_276"><code>/analysis/student</code> (todo)</a>
</li>
<li>
<a href="#toc_277"><code>/analysis/student/name</code></a>
<ul>
<li>
<a href="#toc_278"><code>GET</code> 根据学生id列表获取学生姓名列表</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_279">HEAD</a>
</li>
<li>
<a href="#toc_280">Params</a>
</li>
<li>
<a href="#toc_281">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_282"><code>/analysis/score</code> (todo)</a>
</li>
<li>
<a href="#toc_283"><code>/analysis/score/format</code></a>
<ul>
<li>
<a href="#toc_284"><code>GET</code> 根据学生id列表获取学生成绩信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_285">HEAD</a>
</li>
<li>
<a href="#toc_286">Params</a>
</li>
<li>
<a href="#toc_287">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#toc_288"><code>/analysis/score/all</code></a>
<ul>
<li>
<a href="#toc_289"><code>GET</code> 获取当前学期所有学生成绩信息</a>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<a href="#toc_290">HEAD</a>
</li>
<li>
<a href="#toc_291">Params</a>
</li>
<li>
<a href="#toc_292">Response</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>


<h1 id="toc_1">API STD</h1>

<ul>
<li>GET （SELECT）：从服务器检索特定资源，或资源列表。</li>
<li>POST （CREATE）：在服务器上创建一个新的资源。</li>
<li>PUT （UPDATE）：更新服务器上的资源，提供整个资源。</li>
<li>PATCH （UPDATE）：更新服务器上的资源，仅提供更改的属性。</li>
<li>DELETE （DELETE）：从服务器删除资源。
# API follow STD</li>
<li>所有 url 应当被<strong>小写</strong></li>
<li>禁止使用动词作为 url</li>
<li>如果未加任何筛选条件(通常为参数，即未携带任何参数)，默认不返回任何项。</li>
<li>用户主体为网页客户端和智能手机客户端。</li>
</ul>

<h1 id="toc_2">URL head</h1>

<div><pre><code class="language-none">xxx.xxxxxxx.xx/api/v1/</code></pre></div>

<h1 id="toc_3">版本详情</h1>

<ul>
<li>  v1.0.0 实现网站所需基本功能</li>
<li>  v1.0.1 修改一些不规范的URL</li>
<li>  v1.0.2 增加数据分析端所需功能</li>
<li>  v1.0.3 增加修改个人信息功能</li>
<li>  v1.0.4 对数据分析端功能做出一些调整</li>
<li>  v1.0.5 增加可以对班级ID做增删改查</li>
</ul>

<h1 id="toc_4">服务器返回状态码</h1>

<p><code>英文状态码(正式运行时启用)</code></p>

<div><pre><code class="language-none">2--- 表示成功

&#39;2000&#39;: &#39;OK, with Response&#39;,
&#39;2001&#39;: &#39;OK, Add new resource&#39;,
&#39;2002&#39;: &#39;OK, Request accepted&#39;,
&#39;2004&#39;: &#39;OK, No Response content&#39;,
&#39;2005&#39;: &#39;OK, And need to Refresh&#39;,


4--- 表示失败
-01- 表示用户 token 认证失败
&#39;4010&#39;: &#39;Error, Require token&#39;,
&#39;4011&#39;: &#39;Error, Bad token&#39;,
&#39;4012&#39;: &#39;Error, Token out of date&#39;,
&#39;4014&#39;: &#39;Error, Forbidden token&#39;,
&#39;4018&#39;: &#39;Error, Too much connections&#39;,

-02- 表示用户身份认证失败
&#39;4020&#39;: &#39;Error, User is not exist&#39;,
&#39;4021&#39;: &#39;Error, Username or password is incurrent&#39;,
&#39;4022&#39;: &#39;Error, User out of date&#39;,
&#39;4024&#39;: &#39;Error, Forbidden user&#39;,
&#39;4027&#39;: &#39;Error, No authorized permissions&#39;,

-03- 表示请求本身错误
&#39;4030&#39;: &#39;Error, No match API&#39;,
&#39;4031&#39;: &#39;Error, No match Request Type&#39;,
&#39;4032&#39;: &#39;Error, Missing parameters&#39;,
&#39;4033&#39;: &#39;Error, Not Allowed&#39;,
&#39;4035&#39;: &#39;Error, Gone&#39;,
&#39;40329&#39;: &#39;Error, Too Many Requests&#39;,


5--- 表示服务器失败
&#39;5001&#39;: &#39;Server is outline&#39;,
&#39;5003&#39;: &#39;Can not access database&#39;,
&#39;5004&#39;: &#39;Gateway Forbidden&#39;,
&#39;5101&#39;: &#39;Server is updating&#39;,
&#39;5201&#39;: &#39;Service Stopped&#39;</code></pre></div>

<p><code>中文状态码(调试时启用)</code>    </p>

<div><pre><code class="language-none">2--- 表示成功

&#39;2000&#39;: &#39;成功，服务器已响应&#39;,
&#39;2001&#39;: &#39;成功，服务器添加新资源&#39;,
&#39;2002&#39;: &#39;成功，请求被接收&#39;,
&#39;2004&#39;: &#39;成功，无响应内容&#39;,
&#39;2005&#39;: &#39;成功，资源需要被刷新&#39;,


4--- 表示失败
-01- 表示用户 token 认证失败
&#39;4010&#39;: &#39;错误，需要token验证&#39;,
&#39;4011&#39;: &#39;错误，无效的token&#39;,
&#39;4012&#39;: &#39;错误，过期的token&#39;,
&#39;4014&#39;: &#39;错误，被禁止的token&#39;,
&#39;4018&#39;: &#39;错误，连接次数过多&#39;,

-02- 表示用户身份认证失败
&#39;4020&#39;: &#39;错误，用户不存在&#39;,
&#39;4021&#39;: &#39;错误，用户名或密码错误&#39;,
&#39;4022&#39;: &#39;错误，用户登录已过期&#39;,
&#39;4024&#39;: &#39;错误，用户被禁止访问&#39;,
&#39;4027&#39;: &#39;错误，权限认证不通过&#39;,

-03- 表示请求本身错误
&#39;4030&#39;: &#39;错误，没有符合的API&#39;,
&#39;4031&#39;: &#39;错误，没有符合的请求类型&#39;,
&#39;4032&#39;: &#39;错误，参数缺失&#39;,
&#39;4033&#39;: &#39;错误，请求被拒绝&#39;,
&#39;4035&#39;: &#39;错误，已走远&#39;,
&#39;40329&#39;: &#39;错误，请求次数过多&#39;,


5--- 表示服务器失败
&#39;5001&#39;: &#39;服务器已离线&#39;,
&#39;5003&#39;: &#39;无法连接数据库&#39;,
&#39;5004&#39;: &#39;网管禁止&#39;,
&#39;5101&#39;: &#39;服务器更新中&#39;,
&#39;5201&#39;: &#39;服务已停止&#39;</code></pre></div>

<h1 id="toc_5">Tree View</h1>

<div><pre><code class="language-bash">v1
|- /table
|     |- /lesson
|           |- /format
|      
|     |- /class_field
|           |- /wrapper
|           |- /format
|      
|     |- /class_info
|           |- /detail
|                 |- /all
|                 |- /some
|           |- /format
|
|- /user
|     |- /info  
|           |- /display
|           |- /format
|           |- /manage
|      
|     |- /login
|     |- /logout
|     |- /logon
|
|- /student
|     |- /display
|     |- /format
|
|- /university
|     |- /format
|
|- /college
|     |- /display
|     |- /format
|
|- /major
|     |- /format
|
|- /point
|     |- /display
|     |- /format
|     |- /import_data
|
|- /title
|     |- /display
|     |- /format
|
|- /title_group
|     |- /format
|
|- /analysis
|     |- /student
|           |- /name
|     |- /score
|           /- format
|           /- all
|     |- /pass
|     |- /class
|
</code></pre></div>

<h1 id="toc_6">API Lists</h1>

<p><code>display只支持GET方法，请求方式与format一致</code></p>

<hr>

<h2 id="toc_7"><code>/table/lesson</code>(todo)</h2>

<hr>

<h2 id="toc_8"><code>/table/lesson/format</code></h2>

<p><code>GET</code> <code>POST</code> <code>PUT</code> <code>DELETE</code>
教学班所属的课程组</p>

<h3 id="toc_9"><code>GET</code> 查询课程组 (如「英语听说课」)</h3>

<h6 id="toc_10">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_11">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>college_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>all</strong></td>
<td>boolean</td>
<td>optional, 是否返回所有的课程组, 会忽略(id,name和college_id)筛选项</td>
</tr>
</tbody>
</table>

<h6 id="toc_12">Response</h6>

<div><pre><code class="language-javascript">{
    &quot;code&quot;: &quot;2000&quot;,
    &quot;message&quot;: &quot;OK, with Response&quot;,
    &quot;subjects&quot;: [
        {
            &quot;id&quot;: 1,
            &quot;name&quot;: &quot;英语学术听说&quot;,
            &quot;college_id&quot;: 1
        },
        {
            &quot;id&quot;: 2,
            &quot;name&quot;: &quot;英语电影视听说&quot;,
            &quot;college_id&quot;: 1
        }
    ],
    &quot;count&quot;: 2,
    &quot;all&quot;: &quot;1&quot;
}</code></pre></div>

<h3 id="toc_13"><code>PUT</code> 更改课程组</h3>

<h6 id="toc_14">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_15">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>college_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">{
  &quot;subjects&quot;:[
    {
      &quot;id&quot;:1,
      &quot;name&quot;:&quot;不实用英语会话&quot;,
      &quot;college_id&quot;:1
    }
    ...
  ]
}</code></pre></div>

<h6 id="toc_16">Response</h6>

<p>成功返回  </p>

<div><pre><code class="language-none">{
    &quot;subjects&quot;: [
        {
            &quot;id&quot;: 1
        }
    ],
    &quot;code&quot;: &quot;2005&quot;,
    &quot;message&quot;: &quot;OK, And need to Refresh&quot;
}  
</code></pre></div>

<p>无任何更改返回
<code>
2004 
</code>
其它失败时返回
<code>
4032
</code></p>

<h3 id="toc_17"><code>POST</code> 添加新课程组</h3>

<h6 id="toc_18">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_19">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>required</td>
</tr>
<tr>
<td><strong>college_id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">{
    &quot;subjects&quot;:[
        {
            &quot;id&quot;:1,
            &quot;name&quot;:&quot;英语学术视听说&quot;,
            &quot;college_id&quot;:1
        }   
        
    ]
    
    
}</code></pre></div>

<h6 id="toc_20">Response</h6>

<p>成功返回  </p>

<div><pre><code class="language-none">{  
    &quot;subjects&quot;: [  
        {  
            &quot;id&quot;: 3  
        }  
    ],  
    &quot;code&quot;: &quot;2001&quot;,
    &quot;message&quot;: &quot;OK, Add new resrource&quot;
}  
</code></pre></div>

<p>失败时返回
<code>
2004
</code></p>

<h3 id="toc_21"><code>DELETE</code> 删除课程组</h3>

<h6 id="toc_22">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_23">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">{
  &quot;subjects&quot;:[
    {
      &quot;id&quot;:1,
    }
    ...
  ]
}</code></pre></div>

<h6 id="toc_24">Response</h6>

<p>成功返回  </p>

<div><pre><code class="language-none">{
    &quot;code&quot;: &quot;2005&quot;,
    &quot;message&quot;: &quot;OK, And need to Refresh&quot;
}  </code></pre></div>

<p>没有成功删除则返回
<code>
2004  
</code>
其它失败时返回
<code>
4032  
</code></p>

<hr>

<h2 id="toc_25"><code>/table/class_field/</code> (todo)</h2>

<hr>

<h2 id="toc_26"><code>/table/class_field/wrapper</code></h2>

<p><code>GET</code></p>

<p>返回教学班组织信息(即教学班和学生的多对多关系)</p>

<h3 id="toc_27"><code>GET</code> 根据筛选选项获取教学班拥有学生数及学生的id</h3>

<h6 id="toc_28">Head</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_29">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional，以教学班的数据库主键编号为筛选项</td>
</tr>
<tr>
<td><strong>classInfo_id</strong></td>
<td>integer</td>
<td>optional，以课程所属的课程组为筛选项</td>
</tr>
<tr>
<td><strong>student_id</strong></td>
<td>integer</td>
<td>optional，以学生的数据库主键编号为筛选项查找(该学生参加的)课程</td>
</tr>
</tbody>
</table>

<h6 id="toc_30">Response</h6>

<div><pre><code class="language-javascript">200 OK

JSON
{
    &quot;code&quot;: &quot;2000&quot;,
    &quot;message&quot;: &quot;OK, with Response&quot;,
    &quot;subjects&quot;: [
        {
            &quot;id&quot;: 293,
            &quot;student_id&quot;: 315,
            &quot;classInfo_id&quot;: 39
        }
    ],
    &quot;count&quot;: 1
}</code></pre></div>

<p>具体的返回值包含所有满足筛选项的查询结果在 Class 表中的内容，具体字段参见数据库相关文档。</p>

<p>若查询失败返回 <code>400 Bad Request</code>，若查询结果为空，返回<code>204 No Content</code></p>

<h2 id="toc_31"><code>/table/class_field/format</code></h2>

<p><code>GET</code> <code>POST</code> <code>DELETE</code>
教学班和学生的关系不应该被修改，如果注册了错误的学生，应该将其删除并另行添加。</p>

<h3 id="toc_32"><code>GET</code> 根据筛选项获取教学班组织信息(即教学班与学生的多对多关系)</h3>

<p>再次强调，在无筛选项时不会返回任何班级的信息。</p>

<ul>
<li>对学生信息的修改会触发本接口对应的表额外的修改。<br></li>
</ul>

<h6 id="toc_33">Head</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token  </p>

<h6 id="toc_34">Params</h6>

<p>获取教学班组织信息(即教学班和学生的多对多关系)。若筛选项为空，不返回任何课程。  </p>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional，以教学班的数据库主键编号为筛选项</td>
</tr>
<tr>
<td><strong>classInfo_id</strong></td>
<td>integer</td>
<td>optional，以课程所属的课程组为筛选项</td>
</tr>
<tr>
<td><strong>student_id</strong></td>
<td>integer</td>
<td>optional，以学生的数据库主键编号为筛选项查找(该学生参加的)课程</td>
</tr>
</tbody>
</table>

<h6 id="toc_35">Response</h6>

<div><pre><code class="language-javascript">200 OK

JSON
{
  ...
  &quot;subjects&quot;:[
    {
      &quot;id&quot;:112,
      &quot;lesson&quot;:1,
      &quot;student&quot;:1334124,
      &quot;sid&quot;:&quot;2018211511&quot;,
      &quot;sname&quot;: &quot;赵茶茶&quot;,
      &quot;index&quot;: &quot;01&quot;,
    },
    {
      &quot;id&quot;:113,
      &quot;lesson&quot;:1,
      &quot;student&quot;:1334125,
      &quot;sid&quot;:&quot;2018211512&quot;,
      &quot;sname&quot;: &quot;钱叶叶&quot;,
      &quot;index&quot;: &quot;02&quot;,
    },
    {
      &quot;id&quot;:114,
      &quot;lesson&quot;:1,
      &quot;student&quot;:1334126,
      &quot;sid&quot;:&quot;2018211513&quot;,
      &quot;sname&quot;: &quot;孙树树&quot;,
      &quot;index&quot;: &quot;03&quot;,
    },
    ...
  ],
  &quot;count&quot;:32
}</code></pre></div>

<p>具体的返回值包含所有满足筛选项的查询结果在 Class 表中的内容，具体字段参见数据库相关文档。</p>

<p>若查询失败返回 <code>400 Bad Request</code>，若查询结果为空，返回<code>204 No Content</code></p>

<h3 id="toc_36"><code>POST</code> 添加新的返回教学班组织信息</h3>

<h6 id="toc_37">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_38">Body</h6>

<p>提交时对象必须包含「必须」的字段。</p>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required, 教学班在数据库中的主键编号</td>
</tr>
<tr>
<td><strong>classInfo_id</strong></td>
<td>integer</td>
<td>required, 教学班id</td>
</tr>
<tr>
<td><strong>student_id</strong></td>
<td>integer</td>
<td>required, 学生id</td>
</tr>
<tr>
<td><strong>index</strong></td>
<td>string</td>
<td>optional, 学生在教学班班内编号</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">
JSON
{
  &quot;subjects&quot;: [
    {
      &quot;classInfo_id&quot;:1,
      &quot;student_id&quot;:1,
    }

  ]
 ...
}</code></pre></div>

<h6 id="toc_39">Response</h6>

<p>若成功添加资源，返回
<code>
205 Reset Content
</code>
若失败，返回
<code>
400 Bad Request
</code></p>

<h3 id="toc_40"><code>DELETE</code> 删除教学班组织信息</h3>

<h6 id="toc_41">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_42">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">{
  &quot;subjects&quot;:[
    {
      &quot;id&quot;:1,
    }
    ...
  ]
}</code></pre></div>

<h6 id="toc_43">Response</h6>

<p>成功返回  </p>

<div><pre><code class="language-none">{
    &quot;code&quot;: &quot;2005&quot;,
    &quot;message&quot;: &quot;OK, And need to Refresh&quot;
}  </code></pre></div>

<p>没有成功删除则返回
<code>
2004  
</code>
其它失败时返回
<code>
4032  
</code></p>

<hr>

<h2 id="toc_44"><code>/table/class_info</code>(todo)</h2>

<hr>

<h2 id="toc_45"><code>/table/class_info/detail/all</code></h2>

<h3 id="toc_46"><code>GET</code> 管理员获取到所有课程信息</h3>

<h6 id="toc_47">Head</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token，用于验证身份信息以及寻找到当前教师及其对应角色</p>

<h6 id="toc_48">Response</h6>

<div><pre><code class="language-javascript">200 OK

JSON
{
    &quot;code&quot;: &quot;2000&quot;,
    &quot;message&quot;: &quot;OK, with Response&quot;,
    &quot;subjects&quot;: [
        {
            &quot;id&quot;: 1,
            &quot;name&quot;: &quot;英语学术听说1班&quot;,
            &quot;semester&quot;: &quot;2018秋季&quot;,
            &quot;week&quot;: &quot;4-18单周&quot;,
            &quot;room&quot;: &quot;3-319&quot;,
            &quot;cid&quot;: &quot;001&quot;,
            &quot;teacher_id&quot;: 1,
            &quot;teacher_message&quot;: {
                &quot;id&quot;: 1,
                &quot;tid&quot;: &quot;20182018&quot;,
                &quot;password&quot;: &quot;password1&quot;,
                &quot;name&quot;: &quot;Mr zero&quot;,
                &quot;college&quot;: 1,
                &quot;is_manager&quot;: true,
                &quot;email&quot;: &quot;&quot;,
                &quot;mobile&quot;: &quot;&quot;
            },
        }
        ......
    ],
    &quot;count&quot;: 26
}</code></pre></div>

<p>若查询失败返回 <code>400 Bad Request</code>，若查询结果为空，返回<code>204 No Content</code></p>

<h2 id="toc_49"><code>/table/class_info/detail/some</code></h2>

<h3 id="toc_50"><code>GET</code> 任课教师获取到个人课程信息</h3>

<h6 id="toc_51">Head</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_52">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional，以 class(教学班)的数据库主键为筛选项筛选课程</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional，以 name 为搜索项进行模糊匹配</td>
</tr>
<tr>
<td><strong>cid</strong></td>
<td>string</td>
<td>optional，以课程代号为筛选项筛选课程</td>
</tr>
<tr>
<td><strong>lesson_id</strong></td>
<td>integer</td>
<td>optional，以课程id为搜索项进行匹配</td>
</tr>
<tr>
<td><strong>teacher_id</strong></td>
<td>integer</td>
<td>optional，以教师(或管理员)数据库主键为查询条件查询教师所执教的所有课程</td>
</tr>
<tr>
<td><strong>semester</strong></td>
<td>string</td>
<td>optional，以 semester 为搜索项进行模糊匹配</td>
</tr>
<tr>
<td><strong>week</strong></td>
<td>string</td>
<td>optional，以 week 为搜索项进行模糊匹配</td>
</tr>
<tr>
<td><strong>room</strong></td>
<td>string</td>
<td>optional，以 room 为搜索项进行模糊匹配</td>
</tr>
</tbody>
</table>

<h6 id="toc_53">Response</h6>

<div><pre><code class="language-javascript">200 OK

JSON
{
    &quot;code&quot;: &quot;2000&quot;,
    &quot;message&quot;: &quot;OK, with Response&quot;,
    &quot;subjects&quot;: [
        {
            &quot;id&quot;: 2,
            &quot;name&quot;: &quot;英语学术听说1班&quot;,
            &quot;semester&quot;: &quot;2018秋季&quot;,
            &quot;week&quot;: &quot;4-18单周&quot;,
            &quot;room&quot;: &quot;3-319&quot;,
            &quot;cid&quot;: &quot;002&quot;,
            &quot;teacher_id&quot;: 1,
            &quot;teacher_message&quot;: {
                &quot;id&quot;: 1,
                &quot;tid&quot;: &quot;20182018&quot;,
                &quot;name&quot;: &quot;Mr Joe&quot;,
                &quot;college&quot;: 1,
                &quot;is_manager&quot;: false,
                &quot;email&quot;: &quot;&quot;,
                &quot;mobile&quot;: &quot;&quot;
            },
        }
        ......
    ],
    &quot;count&quot;: 3
}</code></pre></div>

<p>若查询失败返回 <code>400 Bad Request</code>，若查询结果为空，返回<code>204 No Content</code></p>

<h2 id="toc_54"><code>/table/class_info/format</code></h2>

<p><code>GET</code> <code>PUT</code> <code>POST</code> <code>DELETE</code></p>

<p>教学班的辅助信息。</p>

<h3 id="toc_55"><code>GET</code> 获取课程的全部辅助信息</h3>

<h6 id="toc_56">Head</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_57">Params</h6>

<p>获取课程的具体信息，包括 core 部分和 support 部分。若筛选项为空，不返回任何课程。 </p>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional，以 class(教学班)的数据库主键为筛选项筛选课程</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional，以 name 为搜索项进行模糊匹配</td>
</tr>
<tr>
<td><strong>cid</strong></td>
<td>string</td>
<td>optional，以课程代号为筛选项筛选课程</td>
</tr>
<tr>
<td><strong>teacher_id</strong></td>
<td>integer</td>
<td>optional，以教师(或管理员)数据库主键为查询条件查询教师所执教的所有课程</td>
</tr>
<tr>
<td><strong>semester</strong></td>
<td>string</td>
<td>optional，以 semester 为搜索项进行模糊匹配</td>
</tr>
<tr>
<td><strong>week</strong></td>
<td>string</td>
<td>optional，以 week 为搜索项进行模糊匹配</td>
</tr>
<tr>
<td><strong>room</strong></td>
<td>string</td>
<td>optional，以 room 为搜索项进行模糊匹配</td>
</tr>
<tr>
<td><strong>lesson_id</strong></td>
<td>integer</td>
<td>optional，以课程id为搜索项进行匹配</td>
</tr>
</tbody>
</table>

<h6 id="toc_58">Response</h6>

<div><pre><code class="language-javascript">200 OK

JSON
{
  &quot;subjects&quot;: [
    {
      &quot;id&quot;:1,
      &quot;name&quot;:&quot;英语口语听说311班&quot;,
      &quot;teacher&quot;:12314,
      &quot;year&quot;: &quot;2014&quot;,
      &quot;month&quot;: &quot;09&quot;,
      &quot;date&quot;: &quot;Friday,11-18 week &quot;,
      &quot;room&quot;: &quot;base 3 502&quot;,
    }
  ]
  ...
}</code></pre></div>

<p>若查询失败返回 <code>400 Bad Request</code>，若查询结果为空，返回<code>204 No Content</code></p>

<h3 id="toc_59"><code>POST</code> 添加新的返回教学班辅助信息</h3>

<h6 id="toc_60">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_61">Body</h6>

<p>提交时对象必须包含「必须」的字段。</p>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>required</td>
</tr>
<tr>
<td><strong>teacher_id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>lesson_id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>semester</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>week</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>room</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>cid</strong></td>
<td>string</td>
<td>optional</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">
JSON
{
  &quot;subjects&quot;: [
    {
      &quot;classInfo_id&quot;:1,
      &quot;student_id&quot;:1,
    }

  ]
 ...
}</code></pre></div>

<h6 id="toc_62">Response</h6>

<p>若成功添加资源，返回
<code>
205 Reset Content
</code>
若失败，返回
<code>
400 Bad Request
</code></p>

<h3 id="toc_63"><code>PUT</code> 更改课程辅助信息</h3>

<h6 id="toc_64">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token
所添加的课程的授课教师不一定必须为提交 post 的用户。</p>

<h6 id="toc_65">Params</h6>

<h6 id="toc_66">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>teacher_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>semester</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>week</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>room</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>lesson_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">PUT
{
&quot;subjects&quot;: [
  {
    &quot;id&quot;:1,
    &quot;name&quot;:&quot;英语口语听说311班&quot;,
    &quot;teacher&quot;:12315,
    &quot;date&quot;: &quot;Friday,11-18 week&quot;,
    &quot;room&quot;: &quot;base 3 504&quot;,
  },
  {
    &quot;id&quot;:2,
    &quot;name&quot;:&quot;英语口语听说312班&quot;,
    &quot;teacher&quot;:12315,
    &quot;room&quot;: &quot;base 3 504&quot;,
    &quot;_i_m_comment_&quot;: &quot;比如修改了教师和教室&quot;
  }]
}</code></pre></div>

<h6 id="toc_67">Response</h6>

<p>成功创建时返回创建/修改的课程信息的 id  </p>

<div><pre><code class="language-javascript">201 Created / 205 Reset Content

json
{
  &quot;subjects&quot;:[
    {
      &quot;id&quot;:[1,2]
    }
  ],
  &quot;id&quot;:[1,2]
}</code></pre></div>

<p>若创建失败，或若请求非法，未通过校验，返回 400
<code>
400 Bad Request
</code></p>

<h3 id="toc_68"><code>DELETE</code> 删除已有的课程信息</h3>

<h6 id="toc_69">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_70">Body</h6>

<p>提交时对象必须包含正确的 id 字段。
其余选项不会被读入，没有必要包含。</p>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">
json
{
&quot;total&quot;: 1,
&quot;subjects&quot;: [
    {
        &quot;id&quot;: 15,
        &quot;_this_is_another_comment&quot;:&quot;下面这些都可以不要&quot;,
        &quot;room&quot;: &quot;教3 504&quot;,
        &quot;name&quot;:&quot;英语口语听说311班&quot;,
        &quot;teacher&quot;:12314,
        &quot;year&quot;: &quot;2014&quot;,
        &quot;month&quot;: &quot;09&quot;,
        &quot;date&quot;: &quot;Friday,11-18 week &quot;,
        &quot;room&quot;: &quot;base 3 502&quot;,
    }
],
...
}</code></pre></div>

<h6 id="toc_71">Response</h6>

<p>若成功删除资源，返回
<code>
205 Reset Content
</code>
若失败，返回
<code>
400 Bad Request
</code></p>

<hr>

<h2 id="toc_72"><code>/user</code>(todo)</h2>

<hr>

<h2 id="toc_73"><code>/user/info</code>(todo)</h2>

<hr>

<h2 id="toc_74"><code>/user/info/display</code></h2>

<p><code>GET</code></p>

<h3 id="toc_75"><code>GET</code> 获取用户所有信息</h3>

<h6 id="toc_76">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_77">Params</h6>

<p>字段类型与数据库字段相同，注意 is_manager 字段返回值为 0,1。  </p>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>tid</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>college_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>email</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>mobile</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>is_manager</strong></td>
<td>boolean</td>
<td>optional</td>
</tr>
</tbody>
</table>

<h6 id="toc_78">Response</h6>

<p>返回时将不会返回 password (密码)字段</p>

<div><pre><code class="language-javascript">200 OK

{
    &quot;code&quot;: &quot;2000&quot;,
    &quot;message&quot;: &quot;OK, with Response&quot;,
    &quot;subjects&quot;: [
        {
            &quot;id&quot;: 1,
            &quot;tid&quot;: &quot;20182018&quot;,
            &quot;name&quot;: &quot;Mr zero&quot;,
            &quot;is_manager&quot;: true,
            &quot;email&quot;: &quot;&quot;,
            &quot;mobile&quot;: &quot;&quot;,
            &quot;college_id&quot;: 1,
            &quot;college_message&quot;: {
                &quot;id&quot;: 1,
                &quot;name&quot;: &quot;语言与传播学院&quot;,
                &quot;shortname&quot;: &quot;yycb&quot;,
                &quot;university_id&quot;: 1
            },
            &quot;university_message&quot;: {
                &quot;id&quot;: 1,
                &quot;name&quot;: &quot;北京交通大学&quot;,
                &quot;shortname&quot;: &quot;BJTU&quot;
            }
        }
    ],
    &quot;count&quot;: 1
}</code></pre></div>

<p>请求失败时返回 <code>400 Bad Request</code></p>

<p>查询失败时返回<code>204 No Content</code></p>

<h2 id="toc_79"><code>/user/info/format</code></h2>

<p><code>GET</code></p>

<h3 id="toc_80"><code>GET</code> 获取用户的信息</h3>

<h6 id="toc_81">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_82">Params</h6>

<p>字段类型与数据库字段相同，注意 is_manager 字段返回值为 0,1。  </p>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>tid</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>college_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>email</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>mobile</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>is_manager</strong></td>
<td>boolean</td>
<td>optional</td>
</tr>
</tbody>
</table>

<h6 id="toc_83">Response</h6>

<p>返回时将不会返回 password (密码)字段  </p>

<div><pre><code class="language-javascript">200 OK

json
{
  &quot;subjects&quot;:[
    {
      &quot;id&quot;: 14424,
      &quot;tid&quot;: &quot;314123&quot;,
      &quot;name&quot;: &quot;冯天佑&quot;,
      &quot;collage&quot;: 502,
      &quot;manager&quot;: false,
      &quot;email&quot;: &quot;&quot;,
      &quot;mobile&quot;: null,
    }
  ]
}  
</code></pre></div>

<p>请求失败时返回
<code>
400 Bad Request
</code>
查询失败时返回
<code>
204 No Content
</code></p>

<h3 id="toc_84"><code>PUT</code> 更改当前登录用户信息</h3>

<h6 id="toc_85">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_86">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>college_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>email</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>mobile</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>old_password</strong></td>
<td>string</td>
<td>required</td>
</tr>
<tr>
<td><strong>new_password</strong></td>
<td>string</td>
<td>optional</td>
</tr>
</tbody>
</table>

<ul>
<li>示例</li>
</ul>

<div><pre><code class="language-javascript">PUT
{
  &quot;subjects&quot;: [
    {
      &quot;id&quot;: 8,
      &quot;name&quot;: &quot;张云龙&quot;,
      &quot;college_id&quot;: 2,
      &quot;email&quot;: &quot;1313240583@qq.com&quot;,
      &quot;mobile&quot;: &quot;13813801380&quot;,
      &quot;old_password&quot;: &quot;123456&quot;
      &quot;new_password&quot;: &quot;654321&quot;
    }
  ]
}
</code></pre></div>

<h6 id="toc_87">Resonpse</h6>

<p>成功时返回</p>

<div><pre><code class="language-none">{
    &quot;code&quot;: &quot;2005&quot;,
    &quot;message&quot;: &quot;OK, And need to Refresh&quot;
}  </code></pre></div>

<p>更新失败则返回
<code>
{
    &quot;code&quot;: &quot;4038&quot;,
    &quot;message&quot;: &quot;Error, Data Update Failed&quot;
}  
</code></p>

<p>密码验证失败则返回
<code>
{
    &#39;code&#39;: 4021, 
    &#39;message&#39;: &quot;Error, Username or password is incorrect&quot;
}
</code></p>

<h2 id="toc_88"><code>/user/info/manage</code></h2>

<p><code>GET</code> <code>PUT</code> <code>POST</code> <code>DELETE</code>
用户的全部信息。需要管理员权限。
***仅在该url下才可以进行用户的添加/修改/删除</p>

<h3 id="toc_89"><code>GET</code> 获取用户的信息</h3>

<h6 id="toc_90">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_91">Params</h6>

<p>字段类型与数据库字段相同，注意 manager 字段返回值为 0,1。  </p>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>tid</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>college_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>email</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>mobile</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>is_manager</strong></td>
<td>boolean</td>
<td>optional</td>
</tr>
</tbody>
</table>

<h6 id="toc_92">Response</h6>

<p>返回时将会包括 password (密码)字段  </p>

<div><pre><code class="language-javascript">200 OK

json
{
  &quot;subjects&quot;:[
    {
      &quot;id&quot;: 14424,
      &quot;tid&quot;: &quot;314123&quot;,
      &quot;name&quot;: &quot;冯天佑&quot;,
      &quot;collage&quot;: 502,
      &quot;password&quot;: &quot;123456&quot;,
      &quot;manager&quot;: false,
      &quot;email&quot;: &quot;&quot;,
      &quot;mobile&quot;: null,
    }
  ]
}  
</code></pre></div>

<p>请求失败时返回
<code>
400 Bad Request
</code>
查询失败时返回
<code>
204 No Content
</code></p>

<h3 id="toc_93"><code>POST</code> 创建新用户</h3>

<h6 id="toc_94">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_95">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>tid</strong></td>
<td>string</td>
<td>required</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>required</td>
</tr>
<tr>
<td><strong>password</strong></td>
<td>string</td>
<td>required</td>
</tr>
<tr>
<td><strong>college_id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>email</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>mobile</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>is_manager</strong></td>
<td>boolean</td>
<td>optional, 默认为否</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">json
{
  &quot;subjects&quot;:[
    {
      &quot;tid&quot;: &quot;314123&quot;,
      &quot;name&quot;: &quot;冯天佑&quot;,
      &quot;collage&quot;: 502,
      &quot;password&quot;: &quot;123456&quot;,
      &quot;manager&quot;: false,
      &quot;email&quot;: &quot;&quot;,
      &quot;mobile&quot;: null,
      &quot;password&quot;:123456
    }
  ]
}</code></pre></div>

<h6 id="toc_96">Response</h6>

<p>成功时返回
<code>
200 OK
</code></p>

<p>请求失败时返回
<code>
400 Bad Request
</code></p>

<p>查询失败时返回
<code>
204 No Content
No match student(s)
</code></p>

<h3 id="toc_97"><code>PUT</code> 更改用户信息</h3>

<h6 id="toc_98">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_99">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>tid</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>password</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>college_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>email</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>mobile</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>is_manager</strong></td>
<td>boolean</td>
<td>optional, 默认为否</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">json
{
  &quot;subjects&quot;:[
    {
        &quot;id&quot;: &quot;1&quot;,
      &quot;tid&quot;: &quot;314123&quot;,
      &quot;name&quot;: &quot;冯天佑&quot;,
      &quot;collage&quot;: 502,
      &quot;password&quot;: &quot;123456&quot;,
      &quot;manager&quot;: false,
      &quot;email&quot;: &quot;&quot;,
      &quot;mobile&quot;: null,
      &quot;password&quot;:123456
    }
  ]
}</code></pre></div>

<h6 id="toc_100">Response</h6>

<p>成功时返回
<code>
200 OK
</code></p>

<p>请求失败时返回
<code>
400 Bad Request
</code></p>

<p>查询失败时返回
<code>
204 No Content
No match student(s)
</code></p>

<h3 id="toc_101"><code>DELETE</code> 删除指定的用户</h3>

<h6 id="toc_102">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_103">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required 筛选指定 id 的用户/学生</td>
</tr>
</tbody>
</table>

<h6 id="toc_104">Response</h6>

<p>成功时返回
<code>
200 OK
</code></p>

<p>请求失败时返回
<code>
400 Bad Request
</code></p>

<p>查询失败时返回
<code>
204 No Content
No match student(s)
</code></p>

<hr>

<h2 id="toc_105"><code>/user/login</code></h2>

<p><code>POST</code></p>

<h3 id="toc_106"><code>POST</code> 用户登陆</h3>

<h6 id="toc_107">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>tid</strong></td>
<td>string</td>
<td>required</td>
</tr>
<tr>
<td><strong>password</strong></td>
<td>string</td>
<td>required</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-none">{
    &quot;tid&quot;: &quot;admin&quot;,
    &quot;password&quot;: &quot;admin&quot;
}</code></pre></div>

<h6 id="toc_108">Response</h6>

<p>回应内容为 token，是一串包含注明了用户 id (即token拥有者)的字符串
<code>
200 OK
{
    &quot;token&quot;: &quot;userid:2313 sasdasdzxasx&quot;
}
</code>
失败时返回
<code>
400 Bad Request
</code></p>

<hr>

<h2 id="toc_109"><code>/user/logout</code></h2>

<p><code>POST</code></p>

<h3 id="toc_110"><code>POST</code> 登出用户</h3>

<h6 id="toc_111">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_112">Body</h6>

<div><pre><code class="language-none">{}</code></pre></div>

<p><code>注销时无需在请求体中包含任何参数</code></p>

<h6 id="toc_113">Response</h6>

<div><pre><code class="language-none">205 Reset Content</code></pre></div>

<hr>

<h2 id="toc_114"><code>/user/logon</code></h2>

<p><code>POST</code></p>

<h3 id="toc_115"><code>POST</code> 注册用户</h3>

<h6 id="toc_116">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>tid</strong></td>
<td>string</td>
<td>required</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>required</td>
</tr>
<tr>
<td><strong>password</strong></td>
<td>string</td>
<td>required</td>
</tr>
<tr>
<td><strong>college_id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>email</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>mobile</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>is_manager</strong></td>
<td>boolean</td>
<td>optional, 默认为否</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">json
{
  &quot;subjects&quot;:[
    {
      &quot;tid&quot;: &quot;314123&quot;,
      &quot;name&quot;: &quot;冯天佑&quot;,
      &quot;collage&quot;: 502,
      &quot;password&quot;: &quot;123456&quot;,
      &quot;manager&quot;: false,
      &quot;email&quot;: &quot;&quot;,
      &quot;mobile&quot;: null,
      &quot;password&quot;:123456
    }
  ]
}</code></pre></div>

<h6 id="toc_117">Response</h6>

<p>成功时返回
<code>
200 OK
</code></p>

<p>请求失败时返回
<code>
400 Bad Request
</code></p>

<hr>

<h2 id="toc_118"><code>/student/</code>(todo)</h2>

<hr>

<h2 id="toc_119"><code>/student/display</code></h2>

<p><code>GET</code></p>

<h3 id="toc_120"><code>GET</code> 获取学生的完整信息</h3>

<h6 id="toc_121">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_122">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional 筛选指定 id 的学生</td>
</tr>
<tr>
<td><strong>sid</strong></td>
<td>string</td>
<td>optional 筛选指定学号的学生</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional 筛选指定姓名的学生</td>
</tr>
<tr>
<td><strong>major_id</strong></td>
<td>integer</td>
<td>optional 筛选指定专业的学生</td>
</tr>
<tr>
<td><strong>year</strong></td>
<td>string</td>
<td>optional 筛选指定学年的学生</td>
</tr>
<tr>
<td><strong>classInfo_id</strong></td>
<td>integer</td>
<td>optional 筛选指定教学班的学生</td>
</tr>
</tbody>
</table>

<p>以classInfo_id 进行查询，返回该课程下的所有学生，忽略其他参数</p>

<h6 id="toc_123">Response</h6>

<div><pre><code class="language-javascript">200 OK

json
{
    &quot;code&quot;: &quot;2000&quot;,
    &quot;message&quot;: &quot;OK, with Response&quot;,
    &quot;subjects&quot;: [
        {
            &quot;id&quot;: 350,
            &quot;sid&quot;: &quot;17127471&quot;,
            &quot;name&quot;: &quot;应德辉&quot;,
            &quot;year&quot;: &quot;2019&quot;,
            &quot;major_id&quot;: 1,
            &quot;major_message&quot;: {
                &quot;id&quot;: 1,
                &quot;name&quot;: &quot;英语&quot;,
                &quot;shortname&quot;: &quot;&quot;,
                &quot;college_id&quot;: 1
            },
            &quot;college_message&quot;: {
                &quot;id&quot;: 1,
                &quot;name&quot;: &quot;语言与传播学院&quot;,
                &quot;shortname&quot;: &quot;yycb&quot;,
                &quot;university_id&quot;: 1
            }
        }
    ],
    &quot;count&quot;: 1
}</code></pre></div>

<p>请求失败时返回
<code>
400 Bad Request
</code>
查询失败时返回
<code>
204 No Content
</code></p>

<h2 id="toc_124"><code>/student/format</code></h2>

<p><code>GET</code> <code>PUT</code> <code>POST</code> <code>DELETE</code></p>

<h3 id="toc_125"><code>GET</code> 获取学生的基本信息</h3>

<h6 id="toc_126">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token</p>

<h6 id="toc_127">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional 筛选指定 id 的学生</td>
</tr>
<tr>
<td><strong>sid</strong></td>
<td>string</td>
<td>optional 筛选指定学号的学生</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional 筛选指定姓名的学生</td>
</tr>
<tr>
<td><strong>major_id</strong></td>
<td>integer</td>
<td>optional 筛选指定专业的学生</td>
</tr>
<tr>
<td><strong>year</strong></td>
<td>string</td>
<td>optional 筛选指定学年的学生</td>
</tr>
<tr>
<td><strong>classInfo_id</strong></td>
<td>integer</td>
<td>optional 筛选指定教学班的学生</td>
</tr>
</tbody>
</table>

<p>以classInfo_id 进行查询，返回该课程下的所有学生，忽略其他参数</p>

<h6 id="toc_128">Response</h6>

<div><pre><code class="language-javascript">200 OK

json
{
  &quot;subjects&quot;:[
    {
      &quot;id&quot;: 131,
      &quot;sid&quot;: &quot;2018141202&quot;,
      &quot;name&quot;: &quot;敦迟乌&quot;,
      &quot;name&quot;: &quot;2018&quot;,
      &quot;major&quot;: 155,
    }
  ]
}</code></pre></div>

<p>请求失败时返回
<code>
400 Bad Request
</code>
查询失败时返回
<code>
204 No Content
</code></p>

<h3 id="toc_129"><code>PUT</code> 更改学生的基本信息</h3>

<h6 id="toc_130">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_131">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required 筛选指定 id 的用户/学生</td>
</tr>
<tr>
<td><strong>sid</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>major_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>year</strong></td>
<td>string</td>
<td>optional</td>
</tr>
</tbody>
</table>

<h6 id="toc_132">Body</h6>

<p>此处的 id 应与 Params 中的相吻合。</p>

<p>未包含的字段将不会进行更改。</p>

<div><pre><code class="language-javascript">json
{
  &quot;subjects&quot;:[
    {
      &quot;id&quot;: 4,
      &quot;name&quot;: &quot;萨大成&quot;,
      &quot;sid&quot;: &quot;2014123113&quot;,
      &quot;major&quot;: 155,
      &quot;year&quot;: null,
    }
  ]
}</code></pre></div>

<h6 id="toc_133">Response</h6>

<p>成功时返回
<code>
200 OK
</code></p>

<p>请求失败时返回
<code>
400 Bad Request
</code></p>

<p>查询失败时返回
<code>
204 No Content
No match student(s)
</code></p>

<h3 id="toc_134"><code>POST</code> 创建新用户/学生</h3>

<h6 id="toc_135">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_136">Body</h6>

<p>注意：若请求中包含 id 将会被忽略。</p>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>sid</strong></td>
<td>string</td>
<td>required</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>required</td>
</tr>
<tr>
<td><strong>major_id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>year</strong></td>
<td>string</td>
<td>optional</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">json
{
  &quot;subjects&quot;:[
    {
      &quot;id&quot;: 14,
      &quot;name&quot;: &quot;冯天佑&quot;,
      &quot;password&quot;: &quot;12345678&quot;,
      &quot;collage&quot;: 1,
      &quot;year&quot;: null,
      &quot;class_field&quot;: &quot;502&quot;,
      &quot;group&quot;: 1,
      &quot;status&quot;: null,
      &quot;manager&quot;: 0,
      &quot;postion&quot;: &quot;班长&quot;,
      &quot;avatar&quot;: &quot;https://avatar.hahaha.com&quot;,
      &quot;email&quot;: &quot;ju@hmail.com&quot;
    }
  ]
}</code></pre></div>

<h6 id="toc_137">Response</h6>

<p>成功时返回
<code>
200 OK
</code></p>

<p>请求失败时返回
<code>
400 Bad Request
</code></p>

<p>查询失败时返回
<code>
204 No Content
No match student(s)
</code></p>

<h3 id="toc_138"><code>DELETE</code> 删除指定的用户/学生</h3>

<h6 id="toc_139">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_140">Params</h6>

<p>必须用 id 指定试图删除的学生。若包含其余的参数将会被忽略。  </p>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required 筛选指定 id 的用户/学生</td>
</tr>
</tbody>
</table>

<h6 id="toc_141">Response</h6>

<p>成功时返回
<code>
200 OK
</code></p>

<p>请求失败时返回
<code>
400 Bad Request
</code></p>

<p>查询失败时返回
<code>
204 No Content
No match student(s)
</code></p>

<hr>

<h2 id="toc_142"><code>/university</code>(todo)</h2>

<hr>

<h2 id="toc_143"><code>/university/format</code></h2>

<p><code>GET</code> <code>POST</code> <code>PUT</code> <code>DELETE</code></p>

<h3 id="toc_144"><code>GET</code> 获取大学相关信息</h3>

<h6 id="toc_145">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_146">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional 筛选指定 id 的大学</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional 通过名称筛选</td>
</tr>
<tr>
<td><strong>shortname</strong></td>
<td>string</td>
<td>optional 通过昵称筛选</td>
</tr>
</tbody>
</table>

<h6 id="toc_147">Response</h6>

<div><pre><code class="language-javascript">200 OK

{
    &quot;subjects&quot;:[
        {
            &quot;id&quot;: 2,
            &quot;name&quot;: &quot;University of Chinese Academy of Sciences&quot;,
            &quot;shortname&quot;: &quot;UCAS&quot;
        }
    ],
    &quot;count&quot;:1,
    &quot;total&quot;:1,
    &quot;title&quot;:&quot;university&quot;
}</code></pre></div>

<h3 id="toc_148"><code>PUT</code> 更新大学相关信息</h3>

<h6 id="toc_149">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_150">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>shortname</strong></td>
<td>string</td>
<td>optional</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">{
    &quot;subjects&quot;:[
        {
            &quot;id&quot;: 2,
            &quot;name&quot;: &quot;University of Chinese Academy of Sciences&quot;,
            &quot;shortname&quot;: &quot;UCAS&quot;
        }
    ]
}</code></pre></div>

<h6 id="toc_151">Response</h6>

<div><pre><code class="language-none">200 OK</code></pre></div>

<p>失败时返回
<code>
400 Bad Request
</code></p>

<h3 id="toc_152"><code>POST</code> 创建新的大学信息</h3>

<h6 id="toc_153">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_154">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>required</td>
</tr>
<tr>
<td><strong>shortname</strong></td>
<td>string</td>
<td>optional</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">{
    &quot;subjects&quot;:[
        {
            &quot;id&quot;: 2,
            &quot;name&quot;: &quot;University of Chinese Academy of Sciences&quot;,
            &quot;shortname&quot;: &quot;UCAS&quot;
        }
    ]
}</code></pre></div>

<h6 id="toc_155">Response</h6>

<div><pre><code class="language-none">200 OK</code></pre></div>

<p>失败时返回
<code>
400 Bad Request
</code></p>

<h3 id="toc_156"><code>DELETE</code> 删除已有的大学信息</h3>

<h6 id="toc_157">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_158">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">{
  subjects:[{&quot;id&quot;:2}，{&quot;id&quot;:3}]
}</code></pre></div>

<h6 id="toc_159">Response</h6>

<div><pre><code class="language-none">205 Reset Content</code></pre></div>

<hr>

<h2 id="toc_160"><code>/college</code>(todo)</h2>

<hr>

<h2 id="toc_161"><code>/college/display</code></h2>

<p><code>GET</code></p>

<h3 id="toc_162"><code>GET</code> 获取院系全部相关信息</h3>

<h6 id="toc_163">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_164">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional 筛选指定的院系</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional 通过名称进行字符串模糊匹配，会同时查询 <code>name</code> 和 <code>shortname</code> 字段</td>
</tr>
<tr>
<td><strong>university_id</strong></td>
<td>integer</td>
<td>optional 查询大学所有的院系</td>
</tr>
</tbody>
</table>

<h6 id="toc_165">Response</h6>

<div><pre><code class="language-javascript">{
    &quot;code&quot;: &quot;2000&quot;,
    &quot;message&quot;: &quot;OK, with Response&quot;,
    &quot;subjects&quot;: [
        {
            &quot;id&quot;: 1,
            &quot;name&quot;: &quot;语言与传播学院&quot;,
            &quot;shortname&quot;: &quot;yycb&quot;,
            &quot;university_id&quot;: 1,
            &quot;university_message&quot;: {
                &quot;id&quot;: 1,
                &quot;name&quot;: &quot;北京交通大学&quot;,
                &quot;shortname&quot;: &quot;BJTU&quot;
            }
        }
    ],
    &quot;count&quot;: 1
}</code></pre></div>

<h2 id="toc_166"><code>/college/format</code></h2>

<p><code>GET</code> <code>POST</code> <code>PUT</code> <code>DELETE</code></p>

<h3 id="toc_167"><code>GET</code> 获取院系相关信息</h3>

<h6 id="toc_168">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_169">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional 筛选指定的院系</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional 通过名称进行字符串模糊匹配，会同时查询 <code>name</code> 和 <code>shortname</code> 字段</td>
</tr>
<tr>
<td><strong>university_id</strong></td>
<td>integer</td>
<td>optional 查询大学所有的院系</td>
</tr>
</tbody>
</table>

<h6 id="toc_170">Response</h6>

<div><pre><code class="language-javascript">{
  &quot;subjects&quot;: [
      {
          &quot;id&quot;: &quot;1&quot;,
          &quot;name&quot;: &quot;Software Engine&quot;,
          &quot;shortname&quot;: &quot;SE&quot;,
          &quot;university&quot;: &quot;1&quot;
      },
      {
          &quot;id&quot;: &quot;3&quot;,
          &quot;name&quot;: &quot;Art&quot;,
          &quot;shortname&quot;: &quot;Art&quot;,
          &quot;university&quot;: &quot;2&quot;
      }
  ]
}</code></pre></div>

<h3 id="toc_171"><code>PUT</code> 更新院系相关信息</h3>

<h6 id="toc_172">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_173">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>shortname</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>university_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">{
    &quot;subjects&quot;: [
        {
            &quot;id&quot;: &quot;1&quot;,
            &quot;name&quot;: &quot;Software Engine&quot;,
            &quot;shortname&quot;: &quot;SE&quot;,
            &quot;university&quot;: &quot;1&quot;
        },
    ]
}</code></pre></div>

<h6 id="toc_174">Response</h6>

<div><pre><code class="language-none">200 OK</code></pre></div>

<p>失败时返回
<code>
400 Bad Request
</code></p>

<h3 id="toc_175"><code>POST</code> 创建新的院系信息</h3>

<h6 id="toc_176">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_177">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>required</td>
</tr>
<tr>
<td><strong>shortname</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>university_id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">{
    &quot;subjects&quot;: [
        {
            &quot;id&quot;: &quot;1&quot;,
            &quot;name&quot;: &quot;Software Engine&quot;,
            &quot;shortname&quot;: &quot;SE&quot;,
            &quot;university&quot;: &quot;1&quot;
        },
    ]
}</code></pre></div>

<h6 id="toc_178">Response</h6>

<div><pre><code class="language-none">200 OK</code></pre></div>

<p>失败时返回
<code>
400 Bad Request
</code></p>

<h3 id="toc_179"><code>DELETE</code> 删除已有的院系信息</h3>

<h6 id="toc_180">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_181">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">{
  subjects:[{&quot;id&quot;:2}，{&quot;id&quot;:3}]
}</code></pre></div>

<h6 id="toc_182">Response</h6>

<div><pre><code class="language-none">205 Reset Content</code></pre></div>

<hr>

<h2 id="toc_183"><code>/major</code>(todo)</h2>

<hr>

<h2 id="toc_184"><code>/major/format</code></h2>

<p><code>GET</code> <code>POST</code> <code>PUT</code> <code>DELETE</code></p>

<h3 id="toc_185"><code>GET</code> 获取专业相关信息</h3>

<h6 id="toc_186">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_187">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional 筛选指定的专业</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional 通过名称进行字符串模糊匹配，会同时查询 <code>name</code> 和 <code>shortname</code> 字段</td>
</tr>
<tr>
<td><strong>college_id</strong></td>
<td>integer</td>
<td>optional 查询院系所有的专业</td>
</tr>
</tbody>
</table>

<h6 id="toc_188">Response</h6>

<div><pre><code class="language-javascript">{
  &quot;subjects&quot;: [
      {
          &quot;id&quot;: &quot;1&quot;,
          &quot;name&quot;: &quot;Software Engine&quot;,
          &quot;shortname&quot;: &quot;SE&quot;,
          &quot;college&quot;: 1,
      },
      {
          &quot;id&quot;: &quot;3&quot;,
          &quot;name&quot;: &quot;Modern Art&quot;,
          &quot;shortname&quot;: &quot;MA&quot;,
          &quot;college&quot;: 155,
      }
  ]
}</code></pre></div>

<h3 id="toc_189"><code>PUT</code> 更新专业相关信息</h3>

<h6 id="toc_190">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_191">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>shortname</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>college_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">{
    &quot;subjects&quot;: [
        {
            &quot;id&quot;: &quot;1&quot;,
            &quot;name&quot;: &quot;Software Engine&quot;,
            &quot;shortname&quot;: &quot;SE&quot;,
            &quot;college&quot;: &quot;1&quot;
        },
    ]
}</code></pre></div>

<h6 id="toc_192">Response</h6>

<div><pre><code class="language-none">200 OK</code></pre></div>

<p>失败时返回
<code>
400 Bad Request
</code></p>

<h3 id="toc_193"><code>POST</code> 创建新的专业信息</h3>

<h6 id="toc_194">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_195">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>required</td>
</tr>
<tr>
<td><strong>shortname</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>college_id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
</tbody>
</table>

<ul>
<li>示例 </li>
</ul>

<div><pre><code class="language-javascript">{
    &quot;subjects&quot;: [
        {
            &quot;id&quot;: &quot;1&quot;,
            &quot;name&quot;: &quot;Software Engine&quot;,
            &quot;shortname&quot;: &quot;SE&quot;,
            &quot;college&quot;: &quot;1&quot;
        },
    ]
}</code></pre></div>

<h6 id="toc_196">Response</h6>

<div><pre><code class="language-none">200 OK</code></pre></div>

<p>失败时返回
<code>
400 Bad Request
</code></p>

<h3 id="toc_197"><code>DELETE</code> 删除已有的专业信息</h3>

<h6 id="toc_198">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_199">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
</tbody>
</table>

<ul>
<li>示例</li>
</ul>

<div><pre><code class="language-javascript">{
  subjects:[{&quot;id&quot;:2}，{&quot;id&quot;:3}]
}</code></pre></div>

<h6 id="toc_200">Response</h6>

<div><pre><code class="language-none">205 Reset Content</code></pre></div>

<hr>

<h2 id="toc_201"><code>/point</code></h2>

<hr>

<h2 id="toc_202"><code>/point/display</code></h2>

<p><code>GET</code> <code>POST</code> <code>PUT</code> <code>DELETE</code></p>

<h3 id="toc_203"><code>GET</code> 获取所有符合条件分数信息</h3>

<h6 id="toc_204">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_205">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional，对id进行查询</td>
</tr>
<tr>
<td><strong>classInfo_id</strong></td>
<td>integer</td>
<td>required，任何分数查询仅限于一科目内</td>
</tr>
<tr>
<td><strong>student_id</strong></td>
<td>integer</td>
<td>optional，以加分对象(学生)进行查询</td>
</tr>
<tr>
<td><strong>title_id</strong></td>
<td>integer</td>
<td>optional，以列名进行查询</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td>datetime</td>
<td>optional，以时间戳进行筛选</td>
</tr>
<tr>
<td><strong>note</strong></td>
<td>string</td>
<td>optional，以备注进行字符串模糊匹配</td>
</tr>
</tbody>
</table>

<p>返回 student_id 为 350 的学生所有成绩信息
<code>
@/point?leeson=2&amp;type=0
</code></p>

<h6 id="toc_206">Response</h6>

<div><pre><code class="language-none">200 OK
{
    &quot;code&quot;: &quot;2000&quot;,
    &quot;message&quot;: &quot;OK, with Response&quot;,
    &quot;subjects&quot;: [
        {
            &quot;id&quot;: 579,
            &quot;pointNumber&quot;: 52,
            &quot;note&quot;: &quot;&quot;,
            &quot;student_id&quot;: 350,
            &quot;title_id&quot;: 116,
            &quot;classInfo_id&quot;: 39,
            &quot;student_message&quot;: {
                &quot;id&quot;: 350,
                &quot;sid&quot;: &quot;17127471&quot;,
                &quot;name&quot;: &quot;应德辉&quot;,
                &quot;year&quot;: &quot;2019&quot;,
                &quot;major&quot;: 1
            },
            &quot;title_message&quot;: {
                &quot;id&quot;: 116,
                &quot;name&quot;: &quot;客观分&quot;,
                &quot;titleGroup&quot;: 23,
                &quot;weight&quot;: 100,
                &quot;classInfo&quot;: 39
            },
            &quot;classInfo_message&quot;: {
                &quot;id&quot;: 39,
                &quot;name&quot;: &quot;MBA5班&quot;,
                &quot;teacher&quot;: 30,
                &quot;semester&quot;: &quot;2019年秋季&quot;,
                &quot;week&quot;: &quot;1-19周&quot;,
                &quot;room&quot;: &quot;2教学楼&quot;,
                &quot;cid&quot;: &quot;&quot;,
                &quot;lesson&quot;: 22
            }
        },
        ......
    ],
    &quot;count&quot;: 2
}</code></pre></div>

<h2 id="toc_207"><code>/point/format</code></h2>

<p><code>GET</code> <code>POST</code> <code>PUT</code> <code>DELETE</code></p>

<h3 id="toc_208"><code>GET</code> 获取分数条目</h3>

<h6 id="toc_209">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_210">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional，对id进行查询</td>
</tr>
<tr>
<td><strong>classInfo_id</strong></td>
<td>integer</td>
<td>required，任何分数查询仅限于一科目内</td>
</tr>
<tr>
<td><strong>student_id</strong></td>
<td>integer</td>
<td>optional，以加分对象(学生)进行查询</td>
</tr>
<tr>
<td><strong>title_id</strong></td>
<td>integer</td>
<td>optional，以列名进行查询</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td>datetime</td>
<td>optional，以时间戳进行筛选</td>
</tr>
<tr>
<td><strong>note</strong></td>
<td>string</td>
<td>optional，以备注进行字符串模糊匹配</td>
</tr>
</tbody>
</table>

<p>返回 id 为 2 的课程所有加分类型为 0.出席 的加分项
<code>
@/point?leeson=2&amp;type=0
</code></p>

<h6 id="toc_211">Response</h6>

<div><pre><code class="language-none">200 OK
{
  &quot;subjects&quot;: [
      {
          &quot;id&quot;: &quot;1&quot;,
          &quot;class&quot;: 201503,
          &quot;student&quot;:10,
          &quot;point&quot;: 3221,
          &quot;title&quot;: 121,
          &quot;date&quot;: ...,
          &quot;note&quot;:null,
      },
      {
          &quot;id&quot;: &quot;2&quot;,
          &quot;class&quot;: 201421,
          &quot;student&quot;: 81,
          &quot;point&quot;: 3144,
          &quot;title&quot;: 1,
          &quot;date&quot;: ..,
          &quot;notes&quot;:...,
      }
  ],
  &quot;title&quot;:&quot;point&quot;
}</code></pre></div>

<h3 id="toc_212"><code>PUT</code> 更新分数条目</h3>

<h6 id="toc_213">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_214">Params</h6>

<h6 id="toc_215">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>classInfo_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>student_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>title_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>pointNumber</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td>datetime</td>
<td>optional</td>
</tr>
<tr>
<td><strong>note</strong></td>
<td>string</td>
<td>optional</td>
</tr>
</tbody>
</table>

<ul>
<li>示例<br></li>
</ul>

<div><pre><code class="language-javascript">{
  &quot;subjects&quot;: [
      {
          &quot;id&quot;: &quot;1&quot;,
          &quot;lesson&quot;: &quot;2014211503&quot;,
          &quot;student&quot;: &quot;8102212004&quot;,
          &quot;point&quot;: 32,
          &quot;title&quot;: &quot;Test 1&quot;
      },
      {
          &quot;id&quot;: &quot;2&quot;,
          &quot;lesson&quot;: &quot;2014211503&quot;,
          &quot;student&quot;: &quot;8102212001&quot;,
          &quot;point&quot;: 31,
          &quot;title&quot;: &quot;Test 1&quot;
      }
  ],
  &quot;title&quot;:&quot;point&quot;
}</code></pre></div>

<h6 id="toc_216">Response</h6>

<div><pre><code class="language-none">205 Rest Content</code></pre></div>

<h3 id="toc_217"><code>POST</code> 创建新的分数条目</h3>

<h6 id="toc_218">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_219">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>classInfo_id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>student_id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>title_id</strong></td>
<td>string</td>
<td>required</td>
</tr>
<tr>
<td><strong>pointNumber</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td>date</td>
<td>optional</td>
</tr>
<tr>
<td><strong>note</strong></td>
<td>varchar</td>
<td>optional</td>
</tr>
</tbody>
</table>

<ul>
<li>示例</li>
</ul>

<div><pre><code class="language-javascript">{
  &quot;subjects&quot;: [
      {
          &quot;id&quot;: &quot;1&quot;,
          &quot;lesson&quot;: &quot;2014211503&quot;,
          &quot;student&quot;: &quot;8102212004&quot;,
          &quot;point&quot;: 32,
          &quot;title&quot;: &quot;Test 1&quot;
      },
      {
          &quot;id&quot;: &quot;2&quot;,
          &quot;lesson&quot;: &quot;2014211503&quot;,
          &quot;student&quot;: &quot;8102212001&quot;,
          &quot;point&quot;: 31,
          &quot;title&quot;: &quot;Test 1&quot;
      }
  ],
  &quot;title&quot;:&quot;point&quot;
}</code></pre></div>

<h6 id="toc_220">Response</h6>

<div><pre><code class="language-none">205 Rest Content</code></pre></div>

<h3 id="toc_221"><code>DELETE</code> 删除已有的分数条目</h3>

<h6 id="toc_222">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_223">Params</h6>

<h6 id="toc_224">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
</tbody>
</table>

<ul>
<li>示例</li>
</ul>

<div><pre><code class="language-javascript">{
  &quot;subjects&quot;: [
      {
          &quot;id&quot;: &quot;1&quot;,
          &quot;lesson&quot;: &quot;2014211503&quot;
      },
      {
          &quot;id&quot;: &quot;2&quot;
      }
  ],
  &quot;title&quot;:&quot;point&quot;
}</code></pre></div>

<h6 id="toc_225">Response</h6>

<div><pre><code class="language-none">205 Rest Content</code></pre></div>

<h2 id="toc_226"><code>/point/import_data</code></h2>

<h3 id="toc_227"><code>POST</code> 导入分数</h3>

<h6 id="toc_228">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_229">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>title_list</strong></td>
<td>dict list</td>
<td>required</td>
</tr>
<tr>
<td><strong>point_list</strong></td>
<td>dict list</td>
<td>required</td>
</tr>
<tr>
<td><strong>lesson_id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>sid_list</strong></td>
<td>integer list</td>
<td>required</td>
</tr>
</tbody>
</table>

<ul>
<li>示例</li>
</ul>

<div><pre><code class="language-javascript">{
    
}</code></pre></div>

<h6 id="toc_230">Response</h6>

<div><pre><code class="language-none">200 OK</code></pre></div>

<p>失败时返回
<code>
400 Bad Request
</code></p>

<hr>

<h2 id="toc_231"><code>/title</code></h2>

<hr>

<h2 id="toc_232"><code>/title/display</code></h2>

<p><code>GET</code></p>

<h3 id="toc_233"><code>GET</code> 获取小项相关所有信息</h3>

<h6 id="toc_234">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_235">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional 列id</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional 列名</td>
</tr>
<tr>
<td><strong>type</strong></td>
<td>integer</td>
<td>optional 小列的类别 (所在大列)</td>
</tr>
<tr>
<td><strong>titleGroup_id</strong></td>
<td>integer</td>
<td>optional 大列id</td>
</tr>
<tr>
<td><strong>classInfo_id</strong></td>
<td>integer</td>
<td>optional 教学班id</td>
</tr>
</tbody>
</table>

<h6 id="toc_236">Response</h6>

<div><pre><code class="language-javascript">{
    &quot;code&quot;: &quot;2000&quot;,
    &quot;message&quot;: &quot;OK, with Response&quot;,
    &quot;subjects&quot;: [
        {
            &quot;id&quot;: 101,
            &quot;name&quot;: &quot;主观分&quot;,
            &quot;weight&quot;: 1,
            &quot;titleGroup_id&quot;: 9,
            &quot;classInfo_id&quot;: 17,
            &quot;titleGroup_message&quot;: {
                &quot;id&quot;: 9,
                &quot;name&quot;: &quot;化妆&quot;,
                &quot;lesson&quot;: 18,
                &quot;weight&quot;: 20
            },
            &quot;classInfo_message&quot;: {
                &quot;id&quot;: 17,
                &quot;name&quot;: &quot;戏班牙语&quot;,
                &quot;teacher&quot;: 24,
                &quot;semester&quot;: &quot;2018年春季&quot;,
                &quot;week&quot;: &quot;123&quot;,
                &quot;room&quot;: &quot;4444444&quot;,
                &quot;cid&quot;: &quot;&quot;,
                &quot;lesson&quot;: 18
            }
        },
        ...
    ],
    &quot;count&quot;: 6
}</code></pre></div>

<h2 id="toc_237"><code>/title/format</code></h2>

<p><code>GET</code> <code>POST</code> <code>PUT</code> <code>DELETE</code></p>

<h3 id="toc_238"><code>GET</code> 获取小项相关信息</h3>

<h6 id="toc_239">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_240">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional 列id</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional 列名</td>
</tr>
<tr>
<td><strong>type</strong></td>
<td>integer</td>
<td>optional 小列的类别 (所在大列)</td>
</tr>
<tr>
<td><strong>titleGroup_id</strong></td>
<td>integer</td>
<td>optional 大列id</td>
</tr>
<tr>
<td><strong>classInfo_id</strong></td>
<td>integer</td>
<td>optional 教学班id</td>
</tr>
</tbody>
</table>

<h6 id="toc_241">Response</h6>

<div><pre><code class="language-javascript">{
  &quot;subjects&quot;: [
      {
          &quot;id&quot;: 12412412,
          &quot;name&quot;: &quot;Writing&quot;,
          &quot;type&quot;: 1241,
          &quot;weight&quot;: 1341(means 13.41),
      }
  ]
}</code></pre></div>

<h3 id="toc_242"><code>PUT</code> 更新小项相关信息</h3>

<h6 id="toc_243">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_244">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>weight</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>titleGroup_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>classInfo_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
</tbody>
</table>

<ul>
<li>示例</li>
</ul>

<div><pre><code class="language-javascript">{
    &quot;subjects&quot;: [
        {
          &quot;id&quot;: 12412412,
          &quot;name&quot;: &quot;Writing&quot;,
          &quot;type&quot;: 1241,
          &quot;weight&quot;: 1341,
        },
    ]
}</code></pre></div>

<h6 id="toc_245">Response</h6>

<div><pre><code class="language-none">200 OK</code></pre></div>

<p>失败时返回
<code>
400 Bad Request
</code></p>

<h3 id="toc_246"><code>POST</code> 创建新的小项信息</h3>

<h6 id="toc_247">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_248">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>name</strong></td>
<td>varchar</td>
<td>required</td>
</tr>
<tr>
<td><strong>weight</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>titleGroup_id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>classInfo_id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
</tbody>
</table>

<ul>
<li>示例</li>
</ul>

<div><pre><code class="language-javascript">{
    &quot;subjects&quot;: [
        {
          &quot;id&quot;: 12412412,
          &quot;name&quot;: &quot;Writing&quot;,
          &quot;type&quot;: 1241,
          &quot;weight&quot;: 1341,
        },
    ]
}</code></pre></div>

<h6 id="toc_249">Response</h6>

<div><pre><code class="language-none">200 OK</code></pre></div>

<p>失败时返回
<code>
400 Bad Request
</code></p>

<h3 id="toc_250"><code>DELETE</code> 删除已有的小项信息</h3>

<h6 id="toc_251">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_252">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
</tbody>
</table>

<ul>
<li>示例</li>
</ul>

<div><pre><code class="language-javascript">{
  subjects:[{&quot;id&quot;:2}，{&quot;id&quot;:3}]
}</code></pre></div>

<h6 id="toc_253">Response</h6>

<div><pre><code class="language-none">205 Reset Content</code></pre></div>

<h2 id="toc_254"><code>/title_group</code>(todo)</h2>

<hr>

<h2 id="toc_255"><code>/title_group/format</code></h2>

<p><code>GET</code> <code>POST</code> <code>PUT</code> <code>DELETE</code></p>

<h3 id="toc_256"><code>GET</code> 获取大项相关信息</h3>

<h6 id="toc_257">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_258">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>optional 列id</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional,列名</td>
</tr>
<tr>
<td><strong>lesson_id</strong></td>
<td>integer</td>
<td>大列所属课程id</td>
</tr>
<tr>
<td><strong>weight</strong></td>
<td>integer</td>
<td>optional 权重</td>
</tr>
</tbody>
</table>

<h6 id="toc_259">Response</h6>

<div><pre><code class="language-javascript">{
  &quot;subjects&quot;: [
      {
          &quot;id&quot;: 12412412,
          &quot;name&quot;: &quot;Writing&quot;,
          &quot;type&quot;: 1241,
          &quot;weight&quot;: 1341(means 13.41),
      }
  ]
}</code></pre></div>

<h3 id="toc_260"><code>PUT</code> 更新大项相关信息</h3>

<h6 id="toc_261">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_262">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td><strong>name</strong></td>
<td>string</td>
<td>optional</td>
</tr>
<tr>
<td><strong>lesson_id</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>weight</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
</tbody>
</table>

<ul>
<li>示例</li>
</ul>

<div><pre><code class="language-javascript">{
    &quot;subjects&quot;: [
        {
          &quot;id&quot;: 12412412,
          &quot;name&quot;: &quot;Writing&quot;,
          &quot;type&quot;: 1241,
          &quot;weight&quot;: 1341,
        },
    ]
}</code></pre></div>

<h6 id="toc_263">Response</h6>

<div><pre><code class="language-none">200 OK</code></pre></div>

<p>失败时返回
<code>
400 Bad Request
</code></p>

<h3 id="toc_264"><code>POST</code> 创建新的大项信息</h3>

<h6 id="toc_265">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_266">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>name</strong></td>
<td>varchar</td>
<td>required</td>
</tr>
<tr>
<td><strong>weight</strong></td>
<td>integer</td>
<td>optional</td>
</tr>
<tr>
<td><strong>lesson_id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
</tbody>
</table>

<ul>
<li>示例</li>
</ul>

<div><pre><code class="language-javascript">{
    &quot;subjects&quot;: [
        {
          &quot;id&quot;: 12412412,
          &quot;name&quot;: &quot;Writing&quot;,
          &quot;type&quot;: 1241,
          &quot;weight&quot;: 1341,
        },
    ]
}</code></pre></div>

<h6 id="toc_267">Response</h6>

<div><pre><code class="language-none">200 OK</code></pre></div>

<p>失败时返回
<code>
400 Bad Request
</code></p>

<h3 id="toc_268"><code>DELETE</code> 删除已有的大项信息</h3>

<h6 id="toc_269">HEAD</h6>

<p>需要 <code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_270">Body</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id</strong></td>
<td>integer</td>
<td>required</td>
</tr>
</tbody>
</table>

<ul>
<li>示例</li>
</ul>

<div><pre><code class="language-none">{
  subjects:[{&quot;id&quot;:2}，{&quot;id&quot;:3}]
}</code></pre></div>

<h6 id="toc_271">Response</h6>

<div><pre><code class="language-none">205 Reset Content</code></pre></div>

<hr>

<h2 id="toc_272"><code>/semester</code>(todo)</h2>

<p><code>GET</code> <code>PUT</code></p>

<h3 id="toc_273"><code>GET</code> 获取当前学期信息</h3>

<h3 id="toc_274"><code>PUT</code> 更改学期信息</h3>

<h2 id="toc_275"><code>/analysis</code>(todo)</h2>

<p>数据分析端所需接口</p>

<h2 id="toc_276"><code>/analysis/student</code> (todo)</h2>

<p>与学生相关的接口</p>

<h2 id="toc_277"><code>/analysis/student/name</code></h2>

<h3 id="toc_278"><code>GET</code> 根据学生id列表获取学生姓名列表</h3>

<h6 id="toc_279">HEAD</h6>

<p>需要<code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_280">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id_list</strong></td>
<td>list</td>
<td>required</td>
</tr>
</tbody>
</table>

<h6 id="toc_281">Response</h6>

<div><pre><code class="language-javascript">{
  &quot;subjects&quot;: [张三, 李四]
}</code></pre></div>

<h2 id="toc_282"><code>/analysis/score</code> (todo)</h2>

<p>与成绩相关的接口</p>

<h2 id="toc_283"><code>/analysis/score/format</code></h2>

<h3 id="toc_284"><code>GET</code> 根据学生id列表获取学生成绩信息</h3>

<h6 id="toc_285">HEAD</h6>

<p>需要<code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_286">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>id_list</strong></td>
<td>list</td>
<td>required</td>
</tr>
</tbody>
</table>

<h6 id="toc_287">Response</h6>

<div><pre><code class="language-javascript">{
  &quot;subjects&quot;: 
    {
      &quot;sid&quot;: 2019212001,
      &quot;score_mk&quot;: 79,
      &quot;score_zz: 85,
      &quot;score_zk: 77,
      &quot;score_zs&quot;: 79,
      &quot;score_ms&quot;: 80
    },
    {
      &quot;sid&quot;: 2019212002,
      &quot;score_mk&quot;: 69,
      &quot;score_zz: 75,
      &quot;score_zk: 67,
      &quot;score_zs&quot;: 77,
      &quot;score_ms&quot;: 70
    },
    ......
}</code></pre></div>

<h2 id="toc_288"><code>/analysis/score/all</code></h2>

<h3 id="toc_289"><code>GET</code> 获取当前学期所有学生成绩信息</h3>

<h6 id="toc_290">HEAD</h6>

<p>需要<code>X-Access-Token</code>，携带内容为用户 token。</p>

<h6 id="toc_291">Params</h6>

<table>
<thead>
<tr>
<th>params</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>

<tbody>
<tr>
<td><strong>semester</strong></td>
<td>string</td>
<td>required</td>
</tr>
</tbody>
</table>

<h6 id="toc_292">Response</h6>

<div><pre><code class="language-javascript">{
  &quot;subjects&quot;: 
    {
      &#39;vocabulary&#39;:40,
      &#39;hearing&#39;:9,
      &#39;translate&#39;:7,
      &#39;writing&#39;:7,
      &#39;details&#39;:7,
      &#39;subjective_qz&#39;:20,
      &#39;objective_qm&#39;:60,
      &#39;subjective_qm&#39;:20,
      &#39;xuewei&#39;:70
    },
    {
      &#39;vocabulary&#39;:47,
      &#39;hearing&#39;:15,
      &#39;translate&#39;:9,
      &#39;writing&#39;:17,
      &#39;details&#39;:7,
      &#39;subjective_qz&#39;:30,
      &#39;objective_qm&#39;:72,
      &#39;subjective_qm&#39;:30,
      &#39;xuewei&#39;:85
    },
    ......
}</code></pre></div>



<script type="text/javascript">
var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,n=_self.Prism={util:{encode:function(e){return e instanceof a?new a(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function(e){var t=n.util.type(e);switch(t){case"Object":var a={};for(var r in e)e.hasOwnProperty(r)&&(a[r]=n.util.clone(e[r]));return a;case"Array":return e.map&&e.map(function(e){return n.util.clone(e)})}return e}},languages:{extend:function(e,t){var a=n.util.clone(n.languages[e]);for(var r in t)a[r]=t[r];return a},insertBefore:function(e,t,a,r){r=r||n.languages;var l=r[e];if(2==arguments.length){a=arguments[1];for(var i in a)a.hasOwnProperty(i)&&(l[i]=a[i]);return l}var o={};for(var s in l)if(l.hasOwnProperty(s)){if(s==t)for(var i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);o[s]=l[s]}return n.languages.DFS(n.languages,function(t,n){n===r[e]&&t!=e&&(this[t]=o)}),r[e]=o},DFS:function(e,t,a,r){r=r||{};for(var l in e)e.hasOwnProperty(l)&&(t.call(e,l,e[l],a||l),"Object"!==n.util.type(e[l])||r[n.util.objId(e[l])]?"Array"!==n.util.type(e[l])||r[n.util.objId(e[l])]||(r[n.util.objId(e[l])]=!0,n.languages.DFS(e[l],t,l,r)):(r[n.util.objId(e[l])]=!0,n.languages.DFS(e[l],t,null,r)))}},plugins:{},highlightAll:function(e,t){var a={callback:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};n.hooks.run("before-highlightall",a);for(var r,l=a.elements||document.querySelectorAll(a.selector),i=0;r=l[i++];)n.highlightElement(r,e===!0,a.callback)},highlightElement:function(t,a,r){for(var l,i,o=t;o&&!e.test(o.className);)o=o.parentNode;o&&(l=(o.className.match(e)||[,""])[1],i=n.languages[l]),t.className=t.className.replace(e,"").replace(/\s+/g," ")+" language-"+l,o=t.parentNode,/pre/i.test(o.nodeName)&&(o.className=o.className.replace(e,"").replace(/\s+/g," ")+" language-"+l);var s=t.textContent,u={element:t,language:l,grammar:i,code:s};if(!s||!i)return n.hooks.run("complete",u),void 0;if(n.hooks.run("before-highlight",u),a&&_self.Worker){var c=new Worker(n.filename);c.onmessage=function(e){u.highlightedCode=e.data,n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,r&&r.call(u.element),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},c.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else u.highlightedCode=n.highlight(u.code,u.grammar,u.language),n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,r&&r.call(t),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},highlight:function(e,t,r){var l=n.tokenize(e,t);return a.stringify(n.util.encode(l),r)},tokenize:function(e,t){var a=n.Token,r=[e],l=t.rest;if(l){for(var i in l)t[i]=l[i];delete t.rest}e:for(var i in t)if(t.hasOwnProperty(i)&&t[i]){var o=t[i];o="Array"===n.util.type(o)?o:[o];for(var s=0;s<o.length;++s){var u=o[s],c=u.inside,g=!!u.lookbehind,h=!!u.greedy,f=0,d=u.alias;u=u.pattern||u;for(var p=0;p<r.length;p++){var m=r[p];if(r.length>e.length)break e;if(!(m instanceof a)){u.lastIndex=0;var y=u.exec(m),v=1;if(!y&&h&&p!=r.length-1){var b=r[p+1].matchedStr||r[p+1],k=m+b;if(p<r.length-2&&(k+=r[p+2].matchedStr||r[p+2]),u.lastIndex=0,y=u.exec(k),!y)continue;var w=y.index+(g?y[1].length:0);if(w>=m.length)continue;var _=y.index+y[0].length,P=m.length+b.length;if(v=3,P>=_){if(r[p+1].greedy)continue;v=2,k=k.slice(0,P)}m=k}if(y){g&&(f=y[1].length);var w=y.index+f,y=y[0].slice(f),_=w+y.length,S=m.slice(0,w),O=m.slice(_),j=[p,v];S&&j.push(S);var A=new a(i,c?n.tokenize(y,c):y,d,y,h);j.push(A),O&&j.push(O),Array.prototype.splice.apply(r,j)}}}}}return r},hooks:{all:{},add:function(e,t){var a=n.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=n.hooks.all[e];if(a&&a.length)for(var r,l=0;r=a[l++];)r(t)}}},a=n.Token=function(e,t,n,a,r){this.type=e,this.content=t,this.alias=n,this.matchedStr=a||null,this.greedy=!!r};if(a.stringify=function(e,t,r){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return a.stringify(n,t,e)}).join("");var l={type:e.type,content:a.stringify(e.content,t,r),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:r};if("comment"==l.type&&(l.attributes.spellcheck="true"),e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o="";for(var s in l.attributes)o+=(o?" ":"")+s+'="'+(l.attributes[s]||"")+'"';return"<"+l.tag+' class="'+l.classes.join(" ")+'" '+o+">"+l.content+"</"+l.tag+">"},!_self.document)return _self.addEventListener?(_self.addEventListener("message",function(e){var t=JSON.parse(e.data),a=t.language,r=t.code,l=t.immediateClose;_self.postMessage(n.highlight(r,n.languages[a],a)),l&&_self.close()},!1),_self.Prism):_self.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(n.filename=r.src,document.addEventListener&&!r.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",n.highlightAll)),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
</script>

<script type="text/javascript">
Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};
</script>

<script type="text/javascript">
Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}}),Prism.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\\\|\\?[^\\])*?`/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript"}}),Prism.languages.js=Prism.languages.javascript;
</script>

<script type="text/javascript">
!function(e){var t={variable:[{pattern:/\$?\(\([\w\W]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\w\W]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b-?(?:0x[\dA-Fa-f]+|\d*\.?\d+(?:[Ee]-?\d+)?)\b/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[a-z0-9_#\?\*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)(?:"|')?(\w+?)(?:"|')?\s*\r?\n(?:[\s\S])*?\r?\n\2/g,lookbehind:!0,inside:t},{pattern:/(["'])(?:\\\\|\\?[^\\])*?\1/g,inside:t}],variable:t.variable,"function":{pattern:/(^|\s|;|\||&)(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|\s|;|\||&)/,lookbehind:!0},keyword:{pattern:/(^|\s|;|\||&)(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|\s|;|\||&)/,lookbehind:!0},"boolean":{pattern:/(^|\s|;|\||&)(?:true|false)(?=$|\s|;|\||&)/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<<?|>>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a.boolean=e.languages.bash.boolean,a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation}(Prism);
</script>


</body>

</html>
